GHCi does not respect Module Pragmas (https://ghc.haskell.org/trac/ghc/ticket/11469) Pattern Matching (https://ghc.haskell.org/trac/ghc/ticket/14201)
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{-# LANGUAGE OverloadedStrings #-} | |
module Main where | |
import qualified Data.Text as T | |
import Data.Text (Text(..)) | |
longestCommonSubstring :: [Text] -> Text | |
longestCommonSubstring entries = go [""] "" where |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env bash | |
LOGNAME=$1 | |
LOG_DIR=~/logs4 | |
TREE_DIR=~/trees4 | |
RUNS=7 | |
if [ -z "$1" ] | |
then |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Consider a simple definition using guards: | |
foo x | |
| x == C1 = { -# LIKELY 10 #- } e1 | |
| otherwise = { -# LIKELY 0 #- } e2 | |
with C1 being defined by T using uniform default weights: | |
data T = {-# LIKELY 1000 #-} C1 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| x == A = e1 | |
| x == B = e2 | |
| predFunc(x) = e3 | |
case (case x of { C1 -> (Weight: 1000) A; | |
C2 -> (Weight: 1000) B; | |
C3 -> (Weight: 1000) e3; } ) of | |
{ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env stack | |
{- | |
stack | |
script | |
--resolver lts-12.20 | |
--package text,trifecta,containers,parsers,mtl,vector,deepseq | |
-} | |
{-# LANGUAGE RecordWildCards, BangPatterns #-} | |
{-# OPTIONS_GHC -O2 #-} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Tue Aug 27 19:56 2019 Time and Allocation Profiling Report (Final) | |
ghc.exe +RTS -p -RTS Main.hs --make -O -fforce-recomp | |
total time = 7.72 secs (7721 ticks @ 1000 us, 1 processor) | |
total alloc = 9,747,651,160 bytes (excludes profiling overheads) | |
COST CENTRE MODULE SRC %time %alloc | |
simplIdF Simplify compiler\simplCore\Simplify.hs:899:61-79 16.9 18.1 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Tue Aug 27 19:56 2019 Time and Allocation Profiling Report (Final) | |
ghc.exe +RTS -p -RTS Main.hs --make -O -fforce-recomp | |
total time = 7.72 secs (7721 ticks @ 1000 us, 1 processor) | |
total alloc = 9,747,651,160 bytes (excludes profiling overheads) | |
COST CENTRE MODULE SRC %time %alloc | |
simplIdF Simplify compiler\simplCore\Simplify.hs:899:61-79 16.9 18.1 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
compiler\nativeGen\X86\CodeGen.hs:169:1: warning: [-Wincomplete-patterns] | |
Pattern match(es) are non-exhaustive | |
In an equation for `verifyBasicBlock': | |
Patterns not matched: _ :: [Instr] | |
| | |
169 | verifyBasicBlock instrs | |
-- Verifying basic blocks is cheap, but not cheap enough to enable it unconditionally. | |
verifyBasicBlock :: [Instr] -> () |
OlderNewer