commit
stringlengths
40
40
old_file
stringlengths
4
264
new_file
stringlengths
4
264
old_contents
stringlengths
0
4.24k
new_contents
stringlengths
1
5.44k
subject
stringlengths
14
778
message
stringlengths
15
9.92k
lang
stringclasses
277 values
license
stringclasses
13 values
repos
stringlengths
5
127k
af3de90f8f0d489bd3e61ea3e8d106d8d2f93be6
misc/HLint_Hints.hs
misc/HLint_Hints.hs
import "hint" HLint.HLint -- Hints that apply only to the HLint source code error = QVarOp a (UnQual b x) ==> toNamed x error = QConOp a (UnQual b x) ==> toNamed x error = UnQual a (Symbol b x) ==> toNamed x error = UnQual a (Ident b x) ==> toNamed x error = Var a (toNamed x) ==> toNamed x error = Con a (toNamed x)...
-- Hints that apply only to the HLint source code error = QVarOp a (UnQual b x) ==> toNamed x error = QConOp a (UnQual b x) ==> toNamed x error = UnQual a (Symbol b x) ==> toNamed x error = UnQual a (Ident b x) ==> toNamed x error = Var a (toNamed x) ==> toNamed x error = Con a (toNamed x) ==> toNamed x error = ide...
Remove a pointless "hint" import now they are ignored
Remove a pointless "hint" import now they are ignored
Haskell
bsd-3-clause
ndmitchell/hlint,ndmitchell/hlint
f6d5a2cd46ece336058ac3a50ca057fa1ece02af
src/NGramCrackers/ListManipulation.hs
src/NGramCrackers/ListManipulation.hs
module NGramCrackers.ListManipulation ( getNSeqFromList , intToList ) where import Data.List {-| Function creates a list of lists of n length -} getNSeqFromList :: Int -> [a] -> [[a]] getNSeqFromList n [] = [] getNSeqFromList n (x:xs) | n < 0 = error "n must be a positive integer less than 7" ...
module NGramCrackers.ListManipulation ( getNSeqFromList , intToList ) where import Data.List {-| Function creates a list of lists of n length -} getNSeqFromList :: Int -> [a] -> [[a]] getNSeqFromList n [] = [] getNSeqFromList n (x:xs) | n < 0 = error "n must be a positive integer less than 7" |...
Clean up module and import statements
Clean up module and import statements
Haskell
agpl-3.0
R-Morgan/NGramCrackers
4b070105b493e7b02914af112e1c3c3f678c2d75
src/Guide/Routes.hs
src/Guide/Routes.hs
{-# LANGUAGE OverloadedStrings #-} {-# LANGUAGE DataKinds #-} module Guide.Routes ( addRoute , adminRoute , authRoute , deleteRoute , haskellRoute , feedRoute , moveRoute , renderRoute , setRoute ) where import Web.Spock (Path) import Web.Routing.Combinators (PathState(Open)) haskellRoute :: Path...
{-# LANGUAGE OverloadedStrings #-} {-# LANGUAGE DataKinds #-} module Guide.Routes ( addRoute, adminRoute, authRoute, deleteRoute, haskellRoute, feedRoute, moveRoute, renderRoute, setRoute, ) where import Web.Spock (Path, (<//>)) import Web.Routing.Combinators (PathState(Open)) haskellRoute :: Pa...
Fix all routes because they all were broken
Fix all routes because they all were broken
Haskell
bsd-3-clause
aelve/guide,aelve/hslibs,aelve/guide,aelve/guide,aelve/guide
ffa1a0992e066df0b34716cfa3182a16615377a3
exercises/HAD/Y2014/M02/D25/Exercise.hs
exercises/HAD/Y2014/M02/D25/Exercise.hs
module HAD.Y2014.M02.D25.Exercise where -- Implement a variation of the RLE algorithm -- | Compress a list with RLE -- -- Examples: -- -- >>> compress "Hello" -- [('H',1),('e',1),('l',2),('o',1)] -- -- >>> compress [1,1,1,1,1] -- [(1,5)] compress :: Eq a => [a] -> [(a, Int)] compress = map (head &&& length) . group ...
module HAD.Y2014.M02.D25.Exercise where -- Implement a variation of the RLE algorithm -- | Compress a list with RLE -- -- Examples: -- -- >>> compress "Hello" -- [('H',1),('e',1),('l',2),('o',1)] -- -- >>> compress [1,1,1,1,1] -- [(1,5)] compress :: Eq a => [a] -> [(a, Int)] compress = undefined -- | Expand a list w...
Remove abswer from 2014-02.25 exercise
Remove abswer from 2014-02.25 exercise
Haskell
mit
geophf/1HaskellADay,geophf/1HaskellADay,geophf/1HaskellADay
2dbc88eed333dcf5f6ec96782e1d9de7204be38e
website/src/AuthSiteTypes.hs
website/src/AuthSiteTypes.hs
-- | Core definitions for the Auth subsite (see AuthSite.hs) module AuthSiteTypes where import Yesod.Core -- | The loginDest parameter is the route that users should be directed to -- after logging in. data AuthSite loginDest = AuthSite loginDest mkYesodSubData "AuthSite" [parseRoutes| /login LoginR GET POST /logout...
-- | Core definitions for the Auth subsite (see AuthSite.hs) module AuthSiteTypes where import ClassyPrelude import Database.Persist.TH import Yesod.Core -- | The loginDest parameter is the route that users should be directed to -- after logging in. data AuthSite loginDest = AuthSite loginDest mkYesodSubData "AuthS...
Add ProvisionalUser, which goes in the db
Add ProvisionalUser, which goes in the db
Haskell
agpl-3.0
snowdriftcoop/snowdrift
f8e5e27f9058941d4f7cae56fb1230758f0a9edd
tests/ZoomHub/Types/DeepZoomImageSpec.hs
tests/ZoomHub/Types/DeepZoomImageSpec.hs
{-# LANGUAGE OverloadedStrings #-} module ZoomHub.Types.DeepZoomImageSpec ( main , spec ) where import Test.Hspec (Spec, describe, hspec, it, shouldBe) import ZoomHub.Types.DeepZoomImage (TileFormat (JPEG), ...
{-# LANGUAGE OverloadedStrings #-} module ZoomHub.Types.DeepZoomImageSpec ( main , spec ) where import Test.Hspec (Spec, describe, hspec, it, shouldBe) import ZoomHub.Types.DeepZoomImage (TileFormat (JPEG), ...
Tweak test for JPEG DZI
Tweak test for JPEG DZI
Haskell
mit
zoomhub/zoomhub,zoomhub/zoomhub,zoomhub/zoomhub,zoomhub/zoomhub
df0fd65db2743b6e0f68ae021c4937a229d68122
src/Models.hs
src/Models.hs
{-# LANGUAGE EmptyDataDecls #-} {-# LANGUAGE RankNTypes #-} {-# LANGUAGE FlexibleInstances #-} {-# LANGUAGE FlexibleContexts #-} {-# LANGUAGE GADTs #-} {-# LANGUAGE GeneralizedNewtypeDeriving #-} {-# LANGUAGE MultiParamTypeClasses #-} {-# LANGUAGE...
{-# LANGUAGE EmptyDataDecls #-} {-# LANGUAGE RankNTypes #-} {-# LANGUAGE FlexibleInstances #-} {-# LANGUAGE FlexibleContexts #-} {-# LANGUAGE GADTs #-} {-# LANGUAGE GeneralizedNewtypeDeriving #-} {-# LANGUAGE MultiParamTypeClasses #-} {-# LANGUAGE...
Add db function for REPL queries
Add db function for REPL queries
Haskell
mit
parsonsmatt/QuickLift
5bb8b2a4f2883f4d2066dc879fc42b23ccaadf5e
Melchior/Dom/Html.hs
Melchior/Dom/Html.hs
{-# LANGUAGE FlexibleInstances, TypeSynonymInstances #-} module Melchior.Dom.Html ( Renderable , Html , render ) where import Melchior.Data.String (JSString, stringToJSString) type Html = JSString class Renderable a where render :: a -> Html instance Renderable (Int, Int) where render x = stringToJSSt...
{-# LANGUAGE FlexibleInstances, TypeSynonymInstances #-} module Melchior.Dom.Html ( Renderable , Html , render ) where import Melchior.Data.String (JSString, stringToJSString) type Html = JSString class Renderable a where render :: a -> Html instance Renderable (Int, Int) where render x = stringToJSSt...
Make the list join less ugly
Make the list join less ugly
Haskell
mit
kjgorman/melchior,kjgorman/melchior,kjgorman/melchior,kjgorman/melchior,kjgorman/melchior,kjgorman/melchior
d703c15508df1fc1afaa0c209601179ea1cd99f3
HaskellProgramming.hsproj/Chapter09/Cipher.hs
HaskellProgramming.hsproj/Chapter09/Cipher.hs
module Chapter09.Cipher where import Data.Char -- rightward caesar cipher -- param for shift size cipher :: Int -> String -> String cipher _ [] = "" cipher shift (x:xs) = [(chr $ shift + ord x)] ++ (cipher shift xs) decipher :: Int -> String -> String decipher _ [] = "" decipher shift (...
module Chapter09.Cipher where import Data.Char -- rightward caesar cipher -- param for shift size cipher :: Int -> String -> String cipher _ [] = "" cipher shift (x:xs) = [(chr $ shift + ord x)] ++ (cipher shift xs) decipher :: Int -> String -> String decipher _ [] = "" decipher shift x...
Decipher in terms of cipher
Decipher in terms of cipher
Haskell
mit
brodyberg/LearnHaskell,brodyberg/LearnHaskell
ad3d49e204cf723685f8380c8583b67f074b7a0e
src/Kind.hs
src/Kind.hs
module Kind (Id, Kind.getKind, getId, frequency, foldrWithKey) where import Data.Binary import qualified Data.List as L import qualified Data.IntMap as IM import Utils.Assert import Content.Content import Frequency newtype Id a = Id Int deriving (Show, Eq, Ord) instance Binary (Id a) where put (Id i) = put ...
module Kind (Id, Kind.getKind, getId, frequency, foldrWithKey) where import Data.Binary import qualified Data.List as L import qualified Data.IntMap as IM import Utils.Assert import Content.Content import Frequency newtype Id a = Id Int deriving (Show, Eq, Ord) instance Binary (Id a) where put (Id i) = putW...
Reduce size of savefiles by 40%
Reduce size of savefiles by 40% Uncompressed, for long dungeons
Haskell
bsd-3-clause
LambdaHack/LambdaHack,AllureOfTheStars/Allure
c32dc1aefa0d70b5fbbc09106456a86e60993028
src/Main.hs
src/Main.hs
{-# LANGUAGE ViewPatterns, TupleSections, RecordWildCards, ScopedTypeVariables, PatternGuards #-} {-# OPTIONS_GHC -fno-warn-warnings-deprecations #-} module Main(main) where import Action.CmdLine import Action.Generate import Action.Search import Action.Server import Action.Test -- -- generate all -- @tagsoup -- ge...
{-# LANGUAGE ViewPatterns, TupleSections, RecordWildCards, ScopedTypeVariables, PatternGuards #-} module Main(main) where import Action.CmdLine import Action.Generate import Action.Search import Action.Server import Action.Test -- -- generate all -- @tagsoup -- generate tagsoup -- @tagsoup filter -- search the tags...
Remove an unnecessary deprecations warn
Remove an unnecessary deprecations warn
Haskell
bsd-3-clause
BartAdv/hoogle,wolftune/hoogle,ndmitchell/hogle-dead,wolftune/hoogle,ndmitchell/hogle-dead,ndmitchell/hoogle,wolftune/hoogle,BartAdv/hoogle,ndmitchell/hoogle,BartAdv/hoogle,wolftune/hoogle,BartAdv/hoogle,ndmitchell/hoogle
b0f8e82c31d3c4e1db6abfadac1bdbd73386f017
testsuite/tests/ghc-regress/ccall/should_run/ffi016.hs
testsuite/tests/ghc-regress/ccall/should_run/ffi016.hs
-- Tests ForeignPtrEnv finalizers import Text.Printf import Foreign.ForeignPtr import Foreign import GHC.TopHandler import Control.Concurrent import Data.List foreign export ccall fin :: Ptr Int -> Ptr Int -> IO () foreign import ccall "&fin" finptr :: FinalizerEnvPtr Int Int fin :: Ptr Int -> Ptr Int -> IO () fin e...
-- Tests ForeignPtrEnv finalizers import Text.Printf import Foreign.ForeignPtr import Foreign import GHC.TopHandler import Control.Concurrent import Data.List foreign export ccall fin :: Ptr Int -> Ptr Int -> IO () foreign import ccall "&fin" finptr :: FinalizerEnvPtr Int Int fin :: Ptr Int -> Ptr Int -> IO () fin e...
Fix this test on a fast machine The artificial loop wasn't running for long enough for a context switch to happen, so the finalizer wasn't getting to run early enough.
Fix this test on a fast machine The artificial loop wasn't running for long enough for a context switch to happen, so the finalizer wasn't getting to run early enough.
Haskell
bsd-3-clause
vTurbine/ghc,anton-dessiatov/ghc,mfine/ghc,vikraman/ghc,forked-upstream-packages-for-ghcjs/ghc,lukexi/ghc-7.8-arm64,ml9951/ghc,tibbe/ghc,ezyang/ghc,nathyong/microghc-ghc,nkaretnikov/ghc,wxwxwwxxx/ghc,wxwxwwxxx/ghc,wxwxwwxxx/ghc,ghc-android/ghc,ml9951/ghc,sgillespie/ghc,GaloisInc/halvm-ghc,frantisekfarka/ghc-dsi,christi...
a389ad18f19a2060f38fbb43397cf1035d1be80c
haskell/APIServer.hs
haskell/APIServer.hs
{-# LANGUAGE OverloadedStrings #-} import Network.Wai import Network.Wai.Handler.Warp (run) import Network.HTTP.Types (status200) import qualified Data.ByteString.Lazy as LB import qualified Data.ByteString.Lazy.Char8 as LBC import Control.Monad.IO.Class (liftIO) import BT.Routing import BT.Global import BT.Types impor...
{-# LANGUAGE OverloadedStrings #-} import Network.Wai import Network.Wai.Handler.Warp (run) import Network.HTTP.Types (status200) import qualified Data.ByteString.Lazy as LB import qualified Data.ByteString.Lazy.Char8 as LBC import Control.Monad.IO.Class (liftIO) import BT.Routing import BT.Global import BT.Types impor...
Revert "Put error on both stderr and stdout"
Revert "Put error on both stderr and stdout" This reverts commit 5ac9833eadec18a4c881812ea08ba5e7ac83f4f4.
Haskell
mit
c00w/BitToll,c00w/BitToll,c00w/BitToll,c00w/BitToll
17297e4b49be5f198362733bc3ab7acf6e28623f
bench/Main.hs
bench/Main.hs
module Main where import Criterion.Main import qualified Data.Vector.Storable as DVS import Data.Word (Word64) import HaskellWorks.Data.Bits.PopCount.PopCount1 import HaskellWorks.Data.Positioning import ...
module Main where import Criterion.Main import qualified Data.Vector.Storable as DVS import Data.Word (Word64) import qualified HaskellWorks.Data.Bits.PopCount.PopCount1.Broadword as PC1BW import qualified HaskellWorks.Data.Bi...
Add benchmark for broadword popCount vs GHC built-in popCount.
Add benchmark for broadword popCount vs GHC built-in popCount.
Haskell
bsd-3-clause
haskell-works/hw-bits
98b9e0cdb1b2a5c606aab4350b60c2ae38da52f1
tests/examples/Dead1.hs
tests/examples/Dead1.hs
{-# OPTIONS -fglasgow-exts -O -ddump-stranal #-} module Dead1(foo) where foo :: Int -> Int foo n = baz (n+1) (bar1 n) {-# NOINLINE bar1 #-} bar1 n = 1 + bar n bar :: Int -> Int {-# NOINLINE bar #-} {-# RULES "bar/foo" forall n. bar (foo n) = n #-} bar n = n-1 baz :: Int -> Int -> Int {-# INLINE [0] baz #-} baz ...
{-# OPTIONS -O -ddump-stranal #-} module Dead1(foo) where foo :: Int -> Int foo n = baz (n+1) (bar1 n) {-# NOINLINE bar1 #-} bar1 n = 1 + bar n bar :: Int -> Int {-# NOINLINE bar #-} {-# RULES "bar/foo" forall n. bar (foo n) = n #-} bar n = n-1 baz :: Int -> Int -> Int {-# INLINE [0] baz #-} baz m n = m {- R...
Remove deprecated options pragma to avoid parsing with UnicodeSyntax
Remove deprecated options pragma to avoid parsing with UnicodeSyntax
Haskell
bsd-3-clause
mpickering/ghc-exactprint,alanz/ghc-exactprint
2253d9d8d93e293357d45361b61e775c8c956b3a
Betty/Auth.hs
Betty/Auth.hs
------------------------------------------------------------------------ -- -- Some customizations to Yesod.Auth.Email. -- -- Yesod.Auth.Email is good enough out of the box, although some -- things could use some work: (1) the login form (it would be nice to -- have hints about password retrieval and new accounts in th...
------------------------------------------------------------------------ -- -- Some customizations to Yesod.Auth.Email. -- -- Yesod.Auth.Email is good enough out of the box, although some -- things could use some work: (1) the login form (it would be nice to -- have hints about password retrieval and new accounts in th...
Add hidden CSRF token input to login form.
Add hidden CSRF token input to login form.
Haskell
agpl-3.0
sajith/betty-web
57a1893294a10dc6bbc47652bcad425f7267880d
cis194/week3/Golf.hs
cis194/week3/Golf.hs
module Golf where skips :: [a] -> [[a]] skips l = map skip . map (\(x,y) -> (l, y)) $ idx l idx :: [a] -> [(a, Int)] idx l = l `zip` [1..] skip :: ([a] , Int) -> [a] skip (l,n) = [fst x | x <- idx l, (snd x) `mod` n == 0] localMaxima :: [Integer] -> [Integer] localMaxima l = concat . map lm $ triplets l triple...
module Golf where skips :: [a] -> [[a]] skips l = let idx l = l `zip` [1..] in let skip (l,n) = [fst x | x <- idx l, (snd x) `mod` n == 0] in map skip . map (\(x,y) -> (l, y)) $ idx l localMaxima :: [Integer] -> [Integer] localMaxima l = concat . map lm $ trp l where lm ...
Add only one function for skips
Add only one function for skips
Haskell
mit
gscalzo/HaskellTheHardWay,gscalzo/HaskellTheHardWay,gscalzo/HaskellTheHardWay
d87b5295200c00a2982ac831b5cbecf0d00b02c2
Handlers/Autocomplete.hs
Handlers/Autocomplete.hs
module Handlers.Autocomplete (completeApp) where import Network.CGI.Text import Data.ShoppingList import Types import Control.Monad.State (lift, get) autocomplete :: Maybe Text -> ShoppingList -> Text autocomplete Nothing list = getAllAsPlain list autocomplete (Just x) list = getFilteredAsPlain x list completeApp ::...
module Handlers.Autocomplete (completeApp) where import Network.CGI.Text import Data.ShoppingList import Types import Control.Monad.State (lift, get) import Text.Blaze.Renderer.Utf8 (renderHtml) import qualified Text.Blaze.Html5 as H autocomplete :: Maybe Text -> ShoppingList -> Text autocomplete Nothing list = getAl...
Fix unicode in autocomplete (finally)
Fix unicode in autocomplete (finally)
Haskell
bsd-3-clause
MasseR/Shopping-list
49620a7a35979514a50d104ad80102fda73a508b
src/Development/Shake/Internal/Special.hs
src/Development/Shake/Internal/Special.hs
-- | This module contains rule types that have special behaviour in some way. -- Everything in this module is a hack. module Development.Shake.Internal.Special( specialAlwaysRebuilds, specialIsFileKey ) where import Development.Shake.Internal.Value import Data.Typeable specialAlwaysRebuilds :: Value -...
-- | This module contains rule types that have special behaviour in some way. -- Everything in this module is a hack. module Development.Shake.Internal.Special( specialAlwaysRebuilds, specialIsFileKey ) where import Development.Shake.Internal.Value import Data.Typeable specialAlwaysRebuilds :: Value -...
Remove the remaining special lint test
Remove the remaining special lint test
Haskell
bsd-3-clause
ndmitchell/shake,ndmitchell/shake,ndmitchell/shake,ndmitchell/shake,ndmitchell/shake,ndmitchell/shake
35416405b5aaba07e9141b152cb632a29de6d1b1
Data/Array/Parallel/test/nesl/counting-sort/Counting.hs
Data/Array/Parallel/test/nesl/counting-sort/Counting.hs
import Data.Array.Parallel.Unlifted import Bench -- ---------------------------------------------------------------------- -- counting sort from http://www.cs.cmu.edu/~scandal/nesl/algorithms.html -- ---------------------------------------------------------------------- position :: (UA a, Ord a) => a -> UArr a -> Int ...
import Data.Array.Parallel.Unlifted import Bench -- ---------------------------------------------------------------------- -- counting sort from http://www.cs.cmu.edu/~scandal/nesl/algorithms.html -- ---------------------------------------------------------------------- position :: (UA a, Ord a) => a -> UArr a -> Int ...
Use lengthU' in counting sort
Use lengthU' in counting sort
Haskell
bsd-3-clause
mainland/dph,mainland/dph,mainland/dph
fcb60ba84c18ab9249602c9205d8d341aebb141e
src/freq3-divconq.hs
src/freq3-divconq.hs
import System.Environment (getArgs) import Data.Time (getCurrentTime) import System.Random import Control.Exception import Control.Parallel.Strategies import Control.DeepSeq import Shared hiding (frequency) import FrequencyMap main :: IO () main = do [fileName] <- getArgs seed <- newStdGen fileContents ...
import System.Environment (getArgs) import Data.Time (getCurrentTime) import System.Random import Shared hiding (frequency) import FrequencyMap main :: IO () main = do [fileName] <- getArgs seed <- newStdGen fileContents <- readFile fileName putStrLn "Calculate frequency of elements in a list." t0 <...
Remove parCount from freq3 so that we can focus on the effects the algorithm par has
Remove parCount from freq3 so that we can focus on the effects the algorithm par has
Haskell
mit
apauley/parallel-frequency
95b63dfa0d2555c40935e6ba978630a76d702507
src/Driver.hs
src/Driver.hs
-- | Primary Driver for the K3 Ecosystem. import Options.Applicative import Language.K3.Driver.Batch import Language.K3.Driver.Options -- | Mode Dispatch. dispatch :: Options -> IO () dispatch op = do putStrLn $ "Mode: " ++ show (mode op) putStrLn $ "Verbosity: " ++ show (verbosity op) putStrLn $ "Input:...
-- | Primary Driver for the K3 Ecosystem. import Options.Applicative import Language.K3.Driver.Batch import Language.K3.Driver.Options -- | Mode Dispatch. dispatch :: Options -> IO () dispatch op = do putStrLn $ "Mode: " ++ show (mode op) putStrLn $ "Verbosity: " ++ show (verbosity op) putStrLn $ "Input:...
Print the default role on driver invocation.
Print the default role on driver invocation.
Haskell
apache-2.0
yliu120/K3,DaMSL/K3,DaMSL/K3
cbfba96208f682a91178aa19d6ce42497827dedc
Text/HTML/TagSoup/Parser_.hs
Text/HTML/TagSoup/Parser_.hs
module Text.HTML.TagSoup.Parser(TagSoup(..), parseTags) where import Text.HTML.TagSoup.Specification import Text.HTML.TagSoup.Implementation import Text.HTML.TagSoup.Type import Text.HTML.TagSoup.Options_ import Text.StringLike test x = parseTagsOptions parseOptions{optTagWarning=True,optTagPosition=True} $ Spec x ...
module Text.HTML.TagSoup.Parser_(TagSoup(..), parseTags) where import Text.HTML.TagSoup.Specification import Text.HTML.TagSoup.Implementation import Text.HTML.TagSoup.Type import Text.HTML.TagSoup.Options_ import Text.StringLike test x = parseTagsOptions parseOptions{optTagWarning=True,optTagPosition=True} $ Spec x...
Fix the parser module name
Fix the parser module name
Haskell
bsd-3-clause
silkapp/tagsoup
ff53495724b539b8d367e8510f37975c52dda2c0
90101/A.hs
90101/A.hs
import Control.Applicative import Control.Monad import Text.Printf main = do [_, d, n] <- map read . words <$> getLine dict <- replicateM d getLine forM_ [1..n] $ \caseNum -> do word <- getLine let ans = length $ expandWithDict dict word printf "Case #%d: %d\n" (caseNum::Int) (ans::Int) expa...
import Control.Applicative import Control.Monad import Text.Printf main = do [_, d, n] <- map read . words <$> getLine dict <- replicateM d getLine forM_ [1..n] $ \caseNum -> do word <- getLine let ans = length . filter id . map match $ dict where match = all (\(x,y) -> y `elem` x) . zip...
Speed up by just producing True False values instead of all possible lists
Speed up by just producing True False values instead of all possible lists
Haskell
mit
marknsikora/codejam,marknsikora/codejam
e7eed95aa9b4df8773fe4049f7af3a89f310b94c
src/Pakej/Client.hs
src/Pakej/Client.hs
module Pakej.Client where import qualified Data.ByteString as ByteString import qualified Data.Text.IO as Text import qualified Data.Text.Encoding as Text import Network import System.Directory (getAppUserDataDirectory) import System.FilePath ((</>)) import System.IO (hPutStrLn,...
module Pakej.Client where import qualified Data.ByteString as ByteString import qualified Data.Text.IO as Text import qualified Data.Text.Encoding as Text import Network import System.Directory (getAppUserDataDirectory) import System.Exit (exitFailure) import System.FilePath ((<...
Add timeout for server response
Add timeout for server response
Haskell
bsd-3-clause
supki/pakej
3431a6fe933a909946aed28722868111e9fd7886
node/src/Pos/Update/Worker.hs
node/src/Pos/Update/Worker.hs
-- | Update System related workers. module Pos.Update.Worker ( usWorkers ) where import Mockable (fork) import Universum import Pos.Communication.Protocol (OutSpecs, WorkerSpec, localOnNewSlotWorker) import Pos.Constants (curSoftwar...
-- | Update System related workers. module Pos.Update.Worker ( usWorkers ) where import Formatting (sformat, (%)) import Mockable (fork) import Serokell.Util.Text (listJson) import System.Wlog (logDebug) imp...
Add logging to update worker
[CSL-1583] Add logging to update worker
Haskell
apache-2.0
input-output-hk/pos-haskell-prototype,input-output-hk/cardano-sl,input-output-hk/pos-haskell-prototype,input-output-hk/cardano-sl,input-output-hk/cardano-sl,input-output-hk/cardano-sl,input-output-hk/pos-haskell-prototype
ff8b3f02bf430b4e79c41c4f8b3dd83bd3a94a15
xmonad/.xmonad/xmonad.hs
xmonad/.xmonad/xmonad.hs
import System.IO import XMonad import XMonad.Actions.SpawnOn import XMonad.Config.Desktop import XMonad.Hooks.DynamicLog import XMonad.Hooks.ManageDocks import XMonad.Hooks.ManageHelpers (composeOne, isFullscreen, isDialog, doFullFloat, doCenterFloat) import XMonad.Layout.NoBorders import XMonad.Util.EZConfig(additio...
import System.IO import XMonad import XMonad.Actions.SpawnOn import XMonad.Config.Desktop import XMonad.Hooks.DynamicLog import XMonad.Hooks.ManageDocks import XMonad.Hooks.ManageHelpers (composeOne, isFullscreen, isDialog, doFullFloat, doCenterFloat) import XMonad.Layout.NoBorders import XMonad.Util.EZConfig(additio...
Revert "Cleanup the config a bit"
Revert "Cleanup the config a bit" This reverts commit ecdb1d403bc9a71275351516a9dc8eb1d1864925.
Haskell
mit
jaseemabid/dotfiles,jaseemabid/dotfiles,jaseemabid/dotfiles,jaseemabid/dotfiles,jaseemabid/dotfiles
5e7a73c738d0d112755c25e53b3c31fb2b2964b7
testsuite/tests/ghc-regress/typecheck/should_compile/tc163.hs
testsuite/tests/ghc-regress/typecheck/should_compile/tc163.hs
{-# OPTIONS -fglasgow-exts #-} -- This one killed GHC 5.05 and earlier -- The problem was in a newtype with a record selector, with -- a polymorphic argument type. MkId generated a bogus selector -- function module ShouldCompile where type M3 a = forall r. (forall b. M3' b -> (b -> M3' a) -> r) -> r newtype M3...
{-# OPTIONS -fglasgow-exts #-} -- This one killed GHC 5.05 and earlier -- The problem was in a newtype with a record selector, with -- a polymorphic argument type. MkId generated a bogus selector -- function module ShouldCompile where type M3 a = forall r. (forall b. M3' b -> (b -> M3' a) -> r) -> r newtype M3' a ...
Add comments to a very tricky test
Add comments to a very tricky test
Haskell
bsd-3-clause
gridaphobe/ghc,olsner/ghc,sgillespie/ghc,vTurbine/ghc,snoyberg/ghc,christiaanb/ghc,green-haskell/ghc,hferreiro/replay,vikraman/ghc,AlexanderPankiv/ghc,frantisekfarka/ghc-dsi,elieux/ghc,elieux/ghc,nushio3/ghc,sgillespie/ghc,ezyang/ghc,AlexanderPankiv/ghc,nushio3/ghc,bitemyapp/ghc,lukexi/ghc,olsner/ghc,ezyang/ghc,TomMD/g...
347c10a9fc1b66e5ef8e331d758136e96d35be21
day10/day10.hs
day10/day10.hs
import Data.List (group) import Data.Char (digitToInt, isDigit) main :: IO () main = do input <- map digitToInt . filter isDigit <$> readFile "input.txt" print . length . (!! 40) . iterate lookAndSay $ input lookAndSay :: [Int] -> [Int] lookAndSay = concatMap say . group where say xss@(x:_) = [length xss,...
import Data.List (group) import Data.Char (digitToInt, isDigit) main :: IO () main = do input <- map digitToInt . filter isDigit <$> readFile "input.txt" print . length . (!! 50) . iterate lookAndSay $ input lookAndSay :: [Int] -> [Int] lookAndSay = concatMap say . group where say xss@(x:_) = [length xss,...
Complete Day 10 Part 2
Complete Day 10 Part 2
Haskell
mit
devonhollowood/adventofcode,devonhollowood/adventofcode
f7dfcef47af9bf33837e0af3d391c45d12f17677
testsuite/tests/safeHaskell/flags/Flags02.hs
testsuite/tests/safeHaskell/flags/Flags02.hs
{-# OPTIONS_GHC -pgmlc pgmlc, -pgmdll pgmdll, -I., -L., -Uggg, -Dggg, -with-rtsopts full #-} -- | These are all flags that should be allowed module Flags02 where f :: Int f = 1
{-# OPTIONS_GHC -pgmdll pgmdll, -I., -L., -Uggg, -Dggg, -with-rtsopts full #-} -- | These are all flags that should be allowed module Flags02 where f :: Int f = 1
Fix safeHaskell test for llvm backend
Fix safeHaskell test for llvm backend Test was failing (could not execute: pgmlc) for arm (which uses the llvm backend) due to the `-pgmlc pgmlc` in OPTIONS_GHC. It was also failing on amd64 in the same way when `-fllvm` was added to the command line. Its safe to remove because the compiler should already know which l...
Haskell
bsd-3-clause
snoyberg/ghc,mcschroeder/ghc,sgillespie/ghc,ghc-android/ghc,mettekou/ghc,nkaretnikov/ghc,fmthoma/ghc,AlexanderPankiv/ghc,nkaretnikov/ghc,anton-dessiatov/ghc,siddhanathan/ghc,tjakway/ghcjvm,mfine/ghc,wxwxwwxxx/ghc,gridaphobe/ghc,wxwxwwxxx/ghc,GaloisInc/halvm-ghc,elieux/ghc,ezyang/ghc,siddhanathan/ghc,siddhanathan/ghc,ac...
d0d7525f5b611c5a579b9aae62bc7c90994d83f7
hlog.hs
hlog.hs
import Network hiding (accept) import Network.Socket (fdSocket, accept) import Network.Socket.ByteString import Data.List (intercalate) import Data.ByteString.Char8 hiding (length, intercalate) import GHC.Event import System.Posix import System.Posix.IO main :: IO () main = withSocketsDo $ do sock <- listenOn $ Po...
import Network hiding (accept) import Network.Socket (fdSocket, accept) import Network.Socket.ByteString import Data.List (intercalate) import Data.ByteString.Char8 hiding (length, intercalate) import GHC.Event import System.Posix import System.Posix.IO main :: IO () main = withSocketsDo $ do sock <- listenOn $ Po...
Make server pointlessly slow by logging requests in event handler
Make server pointlessly slow by logging requests in event handler
Haskell
bsd-3-clause
tripped/hlog
66b3c71ee2870a705d71b4b7f1c994500dcbfbcc
exercises/bob/src/Example.hs
exercises/bob/src/Example.hs
module Bob (responseFor) where import Data.Char (isSpace, isUpper, isAlpha) data Prompt = Silence | Yell | Question | Other classify :: String -> Prompt classify s | all isSpace s = Silence | any isAlpha s && (all isUpper $ filter isAlpha s) = Yell | '?' == last (filter (not . isSpace) s) = Ques...
module Bob (responseFor) where import Data.Char (isSpace, isUpper, isAlpha) data Prompt = Silence | Yell | Question | Other classify :: String -> Prompt classify s | all isSpace s = Silence | any isAlpha s && all isUpper (filter isAlpha s) = Yell | '?' == last (filter (not . isSpace) s) = Questi...
Improve code based on HLint's suggestions.
bob: Improve code based on HLint's suggestions.
Haskell
mit
exercism/xhaskell
86b7891c02fd6056456240668cd02a69baf34566
src/Test/Journal.hs
src/Test/Journal.hs
module Test.Journal(main) where import Control.Monad import Data.IORef import Development.Shake import Development.Shake.FilePath import Test.Type import System.IO.Unsafe {-# NOINLINE rebuilt #-} rebuilt :: IORef Int rebuilt = unsafePerformIO $ newIORef 0 main = shakeTest_ test $ do let obj = id want $ ma...
module Test.Journal(main) where import Control.Monad import Data.IORef import Development.Shake import Development.Shake.FilePath import Test.Type import System.IO.Unsafe {-# NOINLINE rebuilt #-} rebuilt :: IORef Int rebuilt = unsafePerformIO $ newIORef 0 main = shakeTest_ test $ do want ["a.out","b.out","c.o...
Delete obj = id from journal
Delete obj = id from journal
Haskell
bsd-3-clause
ndmitchell/shake,ndmitchell/shake,ndmitchell/shake,ndmitchell/shake,ndmitchell/shake,ndmitchell/shake
bdc8571110cdc412fd1ed9b70d8e9bebec1a0900
UI/Run.hs
UI/Run.hs
{-# LANGUAGE Rank2Types #-} module UI.Run ( runGuiInSubprocess ) where import Control.Monad import Control.Concurrent import Control.Exception import Reactive.Banana import System.IO import System.Process import UI.TclTk.Builder import UI.Dispatch import UI.Log import Text.PrettyPrint.ANSI.Leijen -- | Run GU...
{-# LANGUAGE Rank2Types #-} module UI.Run ( runGuiInSubprocess ) where import Control.Monad import Control.Concurrent import Control.Exception import Reactive.Banana import System.IO import System.Process import UI.TclTk.Builder import UI.Dispatch import UI.Log import Text.PrettyPrint.ANSI.Leijen -- | Run GU...
Reorder main loop a bit
Reorder main loop a bit
Haskell
bsd-3-clause
Shimuuar/banana-tcltk
e4a9da0efc2ea5c1360806437e59e542cb1fc1a7
test/Github/Event/JsonSpec.hs
test/Github/Event/JsonSpec.hs
{-# LANGUAGE OverloadedStrings #-} module Github.Event.JsonSpec ( main , spec ) where import Test.Hspec import Test.QuickCheck.Instances () import Data.Aeson import Data.ByteString.Lazy (ByteString) import qualified Data.ByteString.Lazy as BL import ...
{-# LANGUAGE OverloadedStrings #-} module Github.Event.JsonSpec ( main , spec ) where import Test.Hspec import Test.QuickCheck.Instances () import Data.Aeson import Data.ByteString.Lazy (ByteString) import qualified Data.ByteString.Lazy as BL import ...
Remove dead code from last commit
Remove dead code from last commit
Haskell
mit
UlfS/ghmm
fbfd0ff5e0a1e152bb4c9372f34eead14697337c
tests/examples/Cpp.hs
tests/examples/Cpp.hs
#!/foo {-# Language CPP #-} #if __GLASGOW_HASKELL__ > 704 foo :: Int #else foo :: Integer #endif foo = 3
#!/foo {-# Language CPP #-} #if __GLASGOW_HASKELL__ > 704 foo :: Int #else foo :: Integer #endif foo = 3 bar :: ( #if __GLASGOW_HASKELL__ > 704 Int) #else Integer) #endif bar = 4
Test case now required proper CPP processing
Test case now required proper CPP processing
Haskell
bsd-3-clause
mpickering/ghc-exactprint,alanz/ghc-exactprint
f8f72cef4443f8490a19d316f8a880d7d0b867fd
src/Printer.hs
src/Printer.hs
module Printer( expression ) where import Expressions expression :: Int -> Expression -> String expression _ (Var e) = e expression _ (Const n) = show n expression p (Add e1 e2) | 2 < p = "(" ++ s ++ ")" | otherwise = s where s = expression 3 e1 ++ " + " ++ expression 2 e2 expression p (Mu...
module Printer( printExpression ) where import Expressions printExpression :: Expression -> String printExpression e = expression 0 e expression :: (Ord n, Num n) => n -> Expression -> String expression _ (Var e) = e expression _ (Const n) = show n expression p (Add e1 e2) | 2 < p = "(" ++ s ++ ")" |...
Implement wrapper for expression printing
printer: Implement wrapper for expression printing
Haskell
bsd-3-clause
etu-fkti5301-bgu/alt-exam_automated_theorem_proving
c331d08075be84b9e05952ad896806d6c2b0023d
test-report.hs
test-report.hs
#! /bin/sh HPC_DIR=dist/hpc cabal clean cabal configure --enable-tests --enable-library-coverage cabal build cabal test open ${HPC_DIR}/html/*/hpc-index.html
#! /bin/sh HPC_DIR=dist/hpc cabal-dev clean cabal-dev configure --enable-tests --enable-library-coverage cabal-dev build cabal-dev test open ${HPC_DIR}/html/*/hpc-index.html
Use cabal-dev for hpc report generation
Use cabal-dev for hpc report generation
Haskell
bsd-3-clause
haskell-distributed/distributed-process-execution,qnikst/distributed-process-task
fbe48c268098bb963845633c326a2571659f36a7
Haskell/Problem002/app/Main.hs
Haskell/Problem002/app/Main.hs
module Main where import Lib main :: IO () main = do print fibs print $ sum fibs where fibs = takeWhile (< 4000000) $ filter (\x -> x `mod` 2 == 0) $ fibonaccis -- [1..10] -- See https://wiki.haskell.org/The_Fibonacci_sequence#Canonical_zipWith_implementation fibonaccis = 0 : 1 : zipWith...
module Main where import Lib main :: IO () main = do print fibs print $ sum fibs where fibs = takeWhile (< 4000000) $ filter (\x -> x `mod` 2 == 0) -- Lambda function, plus a 2-arg function turned into a binary operator with backtics. $ fibonaccis -- [1..10] -- See https://wiki.haskell.o...
Add a comment re lambdas and binary operators.
Add a comment re lambdas and binary operators.
Haskell
mit
JohnL4/ProjectEuler,JohnL4/ProjectEuler,JohnL4/ProjectEuler
7f07f28f4d2350a343a0fa01a9414100c2bff733
src/HSE/Eq.hs
src/HSE/Eq.hs
module HSE.Eq(eqExpShell) where import HSE.Type import HSE.Util import Data.Function import Data.Data eqExpShell :: Exp_ -> Exp_ -> Bool eqExpShell x y = eqExpShellFast x y && eqExpShellSlow x y eqExpShellFast x y = toConstr x == toConstr y eqExpShellSlow = (==) `on` descend (const $ Do an [])
module HSE.Eq(eqExpShell) where import HSE.Type import HSE.Util import Data.Function import Data.Data -- A small expression ex :: Exp_ ex = Do an [] eqExpShell :: Exp_ -> Exp_ -> Bool eqExpShell x y = eqExpShellFast x y && eqExpShellSlow x y eqExpShellFast x y = toConstr x == toConstr y eqExpShellSlow = (==) `o...
Add an equality based on SYB equality - performs equivalently but a bit more complex
Add an equality based on SYB equality - performs equivalently but a bit more complex
Haskell
bsd-3-clause
bitemyapp/hlint,eigengrau/hlint,ndmitchell/hlint,mpickering/hlint,ndmitchell/hlint,gibiansky/hlint
22a3b8867797a0edff724985b1182aabba341764
src/Chat/Bot/Guess.hs
src/Chat/Bot/Guess.hs
module Chat.Bot.Guess where import Chat.Bot.Answer.Guess import Chat.Bot.Misc.Guess import Chat.Data -- | LEVEL: Easy -- -- This requires implementing comparing two numbers and display a message depending on the result -- -- >>> guessMe 1 2 -- GuessLower -- >>> guessMe 2 1 -- GuessHighe...
module Chat.Bot.Guess where import Chat.Bot.Answer.Guess import Chat.Bot.Misc.Guess import Chat.Data -- | LEVEL: Easy -- -- This requires implementing comparing two numbers and display a message depending on the result -- -- >>> guessMe 1 2 -- GuessLower -- >>> guessMe 2 1 -- GuessHighe...
Fix infinite loop in guess bot
Fix infinite loop in guess bot
Haskell
bsd-3-clause
charleso/haskell-in-haste
8028b36e42107dc599f90caffa24a7002cce8c94
tests/benchmarks/FileRead.hs
tests/benchmarks/FileRead.hs
{-# LANGUAGE BangPatterns #-} import System.Environment (getArgs) import qualified Data.Text.Lazy.IO as T import qualified Data.Text.Lazy as T import qualified Data.Text.Lazy.Encoding as T import qualified Data.ByteString.Lazy.Char8 as B import qualified Data.ByteString.Char8 as BS import qualified Data.ByteString.Laz...
{-# LANGUAGE BangPatterns #-} import System.Environment (getArgs) import qualified Data.Text.Lazy.IO as T import qualified Data.Text.Lazy as T import qualified Data.Text.Lazy.Encoding as T import qualified Data.ByteString.Lazy.Char8 as B import qualified Data.ByteString.Char8 as BS import qualified Data.ByteString.Laz...
Add a few handy SCCs
Add a few handy SCCs --HG-- extra : convert_revision : 2ff7026a8bda328139f5340876d4321b453e2051
Haskell
bsd-2-clause
bos/text,hvr/text,spencerjanssen/text,23Skidoo/text,alexliew/text,bgamari/text,ekmett/text,alexliew/text,alexliew/text,bgamari/text,23Skidoo/text,ekmett/text,bgamari/text,ekmett/text,23Skidoo/text,aloiscochard/text,hvr/text,aloiscochard/text,text-utf8/text,spencerjanssen/text,hvr/text,bgamari/text,text-utf8/text,alexli...
4600bffaeac1c49d5426f02aef0f7f32b78c08f2
src/MB/Gladtex.hs
src/MB/Gladtex.hs
module MB.Gladtex ( gladTex , checkForGladtex ) where import System.Exit ( ExitCode(..) , exitFailure ) import System.Process ( readProcessWithExitCode ) import Control.Monad ( when ) import MB.Types gladtexProgName :: String gladtexProgName = "gladtex" gladTex :: Config -> Fil...
module MB.Gladtex ( gladTex , checkForGladtex ) where import System.Exit ( ExitCode(..) , exitFailure ) import System.Process ( readProcessWithExitCode ) import Control.Monad ( when ) import MB.Types gladtexProgName :: String gladtexProgName = "gladtex" gladTex :: Config -> Fil...
Remove antialiasing parameter to gladtex
Remove antialiasing parameter to gladtex Ignore-this: 3e0bcef06d2703f79d9cc23d002e2f30 darcs-hash:20100815064239-e018d-3cf2b500898517207877689c9b1da489216763df.gz
Haskell
bsd-3-clause
jtdaugherty/mathblog
bc46b44021cfdd72696a81ee04dad96fa2bd6e40
Examples/Test/FilePath.hs
Examples/Test/FilePath.hs
module Examples.Test.FilePath(main) where import Development.Shake.FilePath import Examples.Util main = shaken test $ \args obj -> return () test build obj = do normalise "neil//./test/moo/../bar/bob/../foo" === "neil/test/bar/foo" normalise "bar/foo" === "bar/foo" normalise "bar/foo/" === "bar/foo/" ...
module Examples.Test.FilePath(main) where import Development.Shake.FilePath import Development.Shake.Prelude import Examples.Util main = shaken test $ \args obj -> return () test build obj = do normalise "neil//./test/moo/../bar/bob/../foo" === "neil/test/bar/foo" normalise "bar/foo" === "bar/foo" nor...
Add some more tests for normalise that are different Windows vs Posix
Add some more tests for normalise that are different Windows vs Posix
Haskell
bsd-3-clause
ndmitchell/shake,ndmitchell/shake,ndmitchell/shake,ndmitchell/shake,ndmitchell/shake,ndmitchell/shake
a65ea2df5583571035db8b8fcee4cef73b50b197
src/Gfx/EngineState.hs
src/Gfx/EngineState.hs
module Gfx.EngineState where import Graphics.Rendering.OpenGL (Color4(..)) data EngineState = EngineState { fillColours :: [ Color4 Double ] , strokeColours :: [ Color4 Double ] , drawTransparencies :: Bool } deriving (Show, Eq) baseState :: EngineState baseState = EngineState { fillColours = [Color4 1 1...
module Gfx.EngineState where import Graphics.Rendering.OpenGL (Color4(..)) import Gfx.Ast (Block) data Scene = Scene { sceneBackground :: Color4 Float, sceneGfx :: Block } data EngineState = EngineState { fillColours :: [ Color4 Double ] , strokeColours :: [ Color4 Double ] , drawTransparencies :: Bool ...
Add Scene structure for gfx Scenes
Add Scene structure for gfx Scenes
Haskell
bsd-3-clause
rumblesan/improviz,rumblesan/improviz
52436912aab8adc64c6341894c885370d1b2a2a8
1-20/3a.hs
1-20/3a.hs
--------------------------------------------------------- -- Largest prime factor -- Problem 3 -- The prime factors of 13195 are 5, 7, 13 and 29. -- -- What is the largest prime factor of the number 600851475143 ? ---------------------------------------------------------- -- To build: ghc --make foo.hs -- To run: ...
--------------------------------------------------------- -- Largest prime factor -- Problem 3 -- The prime factors of 13195 are 5, 7, 13 and 29. -- -- What is the largest prime factor of the number 600851475143 ? ---------------------------------------------------------- -- To build: ghc --make foo.hs -- To run: ...
Use exponentiation operator. Align arguments vertically for parallel cases.
Use exponentiation operator. Align arguments vertically for parallel cases.
Haskell
mit
bertdouglas/euler-haskell
3622cf3b6a337480917c8e14e95dbf65625521f5
src/Functions/AsciiPicture.hs
src/Functions/AsciiPicture.hs
module Functions.AsciiPicture ( runAsciiPicture ) where import Control.Monad.State import System.Process import System.Exit import Data.List import qualified BotTypes as BT runAsciiPicture :: BT.BotFunction runAsciiPicture = do str <- BT.getValue BT.message asciiPicture str asciiPicture :: String -> BT.N...
module Functions.AsciiPicture ( runAsciiPicture ) where import Control.Monad.State import System.Process import System.Exit import Data.List import qualified BotTypes as BT dickbut :: String dickbut = "https://static1.fjcdn.com/thumbnails/comments/" ++ "Dickbut+for+everybody+zentertainments+gets+a+dickbut+_" ...
Add a default image location for dickbut
Add a default image location for dickbut Users no longer need to find an image of dickbut every time they want to ascii art print one.
Haskell
bsd-3-clause
bus000/Dikunt
fe0d3d4e1687a2757fd789013b573db4c050074f
src/Iptf.hs
src/Iptf.hs
module Iptf ( updateHostsFile , ipFromWeb ) where import Iptf.Hosts (updateHostsFile) import Iptf.Ip (IP, ipFromWeb) -- run :: IO () -- run = do -- opts <- getOptions -- tryWebIP <- ipFromWeb (url opts) -- case tryWebIP of -- Right webIP -> do -- h...
module Iptf ( updateHostsFile , ipFromWeb ) where import Iptf.Hosts (updateHostsFile) import Iptf.Ip (IP, ipFromWeb)
Remove commented out run function
Remove commented out run function
Haskell
mit
werbitt/ip-to-file
dc05f28aa810c20b7de75527a2eb501a7e4b8a1b
src/Main.hs
src/Main.hs
module Main where import Parser import Codegen import Emit import Control.Monad.Trans import System.IO import System.Environment import System.Console.Haskeline import qualified LLVM.General.AST as AST initModule :: AST.Module initModule = emptyModule "Lithium" printAST :: AST.Module -> String -> IO (Maybe AST.Mo...
module Main where import Parser import Codegen import Emit import Control.Monad.Trans import System.IO import System.Environment import System.Console.Haskeline import qualified LLVM.General.AST as AST initModule :: AST.Module initModule = emptyModule "Lithium" printAST :: String -> IO () printAST source = do l...
Remove unnecessary parameter to printAST
Remove unnecessary parameter to printAST
Haskell
mit
NoxHarmonium/lithium-lang
93a91b0be2f0498490ad11993fd84ee46a33c7f1
src/Internal/Config.hs
src/Internal/Config.hs
module Internal.Config where import Internal.ToolChain import Development.Shake import Development.Shake.Config import Development.Shake.FilePath import Control.Applicative import Data.Maybe (fromMaybe) getBoard :: Action (Maybe Board) getBoard = fmap read <$> getConfig "BOARD" getMCU :: Action MCU getMCU = do m...
module Internal.Config where import Internal.ToolChain import Development.Shake import Development.Shake.Config import Development.Shake.FilePath import Control.Applicative import Data.Maybe (fromMaybe) getBoard :: Action (Maybe Board) getBoard = fmap read <$> getConfig "BOARD" getMCU :: Action MCU getMCU = do m...
Use common HAL for ARM.
Use common HAL for ARM.
Haskell
bsd-3-clause
marangisto/karakul
3b764b51955af0a16f6f886eba67d4efb79003f4
src/Import.hs
src/Import.hs
-- Copyright © 2012 Julian Blake Kongslie <jblake@omgwallhack.org> -- Licensed under the MIT license. {-# LANGUAGE RecordWildCards #-} module Main where import Control.Monad import Database.HDBC import Database.HDBC.PostgreSQL import Database.HDBC.Sqlite3 main :: IO () main = withPostgreSQL "dbname=fanfiction user=...
-- Copyright © 2012 Julian Blake Kongslie <jblake@omgwallhack.org> -- Licensed under the MIT license. {-# LANGUAGE RecordWildCards #-} module Main where import Control.Monad import Database.HDBC import Database.HDBC.PostgreSQL import Database.HDBC.Sqlite3 main :: IO () main = withPostgreSQL "dbname=fanfiction user=...
Make the import somewhat more deterministic.
Make the import somewhat more deterministic.
Haskell
mit
jblake/fanfiction,jblake/fanfiction
a1b5b95b057a5336aa3dc66f0ad760ffd95533ab
src/Ef/Context/State/Attribute.hs
src/Ef/Context/State/Attribute.hs
{-# LANGUAGE GADTs #-} module Ef.Context.State.Attribute ( Stateful(..) ) where data Stateful st k where State :: !st -> (st -> k) -> Stateful st k
{-# LANGUAGE GADTs #-} module Ef.Context.State.Attribute ( Stateful(..) ) where data Stateful st k where State :: st -> (st -> k) -> Stateful st k
Remove accidental strictness annotation in State attribute.
Remove accidental strictness annotation in State attribute.
Haskell
bsd-3-clause
grumply/mop,grumply/mop
e3e2d42ae297f269896758ac963724d1022733e4
test/Handler/ProfileBGUnitSpec.hs
test/Handler/ProfileBGUnitSpec.hs
module Handler.ProfileBGUnitSpec (spec) where import TestImport spec :: Spec spec = withApp $ describe "test /profile/bgunit" $ do it "get /profile/bgunit without authorization" $ do get ProfileBGUnitR statusIs 405 it "post /profile/bgunit without authorization, with CSRF...
module Handler.ProfileBGUnitSpec (spec) where import TestImport spec :: Spec spec = withApp $ describe "test /profile/bgunit" $ do it "get /profile/bgunit without authorization" $ do get ProfileBGUnitR statusIs 405 it "post /profile/bgunit without authorization, with CSRF...
Fix case sensitive string in test
Fix case sensitive string in test Yesod seems to have changed again in small and annoying ways
Haskell
agpl-3.0
sajith/betty-web
9922a25d8ac61fb1d238f6e6f11968465e921b38
Haskell99/q07.hs
Haskell99/q07.hs
module Q07 where data NestedList a = Elem a | List [NestedList a] flatten (Elem x) = [x] flatten (List y) = foldr (++) [] $ map flatten y
module Q07 where data NestedList a = Elem a | List [NestedList a] flatten :: NestedList a -> [a] flatten x = let flatten' :: NestedList a -> [a] -> [a] flatten' (Elem x) acc = x:acc flatten' (List [] ) acc = acc flatten' (List (p:q)) acc = flatten' p (flatten' (List q) acc) in flatte...
Improve Haskell 99 Problem 7
Improve Haskell 99 Problem 7
Haskell
mit
cshung/MiscLab,cshung/MiscLab,cshung/MiscLab,cshung/MiscLab,cshung/MiscLab,cshung/MiscLab,cshung/MiscLab,cshung/MiscLab,cshung/MiscLab,cshung/MiscLab
5246c7e3901b96fbdd1e12c2da519c9cbbd7b974
examples/Main.hs
examples/Main.hs
{-# LANGUAGE OverloadedStrings #-} module Main where import Control.Exception (bracket) import Control.Monad.IO.Class (liftIO) import Data.Function ((&)) import Network.Simple.TCP (connectSock) import Network.Socket (socketToHandle) import System.Exit (exitSuccess) import System.IO...
{-# LANGUAGE OverloadedStrings #-} module Main where import Control.Monad.IO.Class (liftIO) import Data.Function ((&)) import Network.Simple.TCP (connect) import System.Exit (exitSuccess) import System.IO (IOMode(ReadWriteMode), hClose) import Data.Capnp (def, defaultLimit)...
Use socketTransport in the echo client example.
Use socketTransport in the echo client example.
Haskell
mit
zenhack/haskell-capnp
f234e7d6778081ab37d477e6d7027d333ceb56b1
Data/Vector/Fusion/Util.hs
Data/Vector/Fusion/Util.hs
-- | -- Module : Data.Vector.Fusion.Util -- Copyright : (c) Roman Leshchinskiy 2009 -- License : BSD-style -- -- Maintainer : Roman Leshchinskiy <rl@cse.unsw.edu.au> -- Stability : experimental -- Portability : portable -- -- Fusion-related utility types -- module Data.Vector.Fusion.Util ( Id(..), Box...
-- | -- Module : Data.Vector.Fusion.Util -- Copyright : (c) Roman Leshchinskiy 2009 -- License : BSD-style -- -- Maintainer : Roman Leshchinskiy <rl@cse.unsw.edu.au> -- Stability : experimental -- Portability : portable -- -- Fusion-related utility types -- module Data.Vector.Fusion.Util ( Id(..), Box...
Define Applicative instances for Box/Id
Define Applicative instances for Box/Id This silences GHC 7.8's AMP warning. See http://www.haskell.org/haskellwiki/Functor-Applicative-Monad_Proposal#Future-proofing_current_code for more details
Haskell
bsd-3-clause
phadej/vector,thomie/vector,dolio/vector,hvr/vector,phaazon/vector,seckcoder/vector
e9a8b91cf305812fb92a3f6ff1e4a34fb6b5781c
src/Evolution.hs
src/Evolution.hs
module Evolution(EvolutionRules(EvolutionRules, mutation, breeding, selection), evolution) where import Data.Random import Data.Functor import Population data EvolutionRules = EvolutionRules { mutation :: Mutation, breeding :: Breeding, selection :: Selection } step :: [PopulationChange] -> RVar Populat...
module Evolution(EvolutionRules(EvolutionRules, mutation, breeding, selection), evolution) where import Data.Random import Data.Functor import Population data EvolutionRules = EvolutionRules { mutation :: Mutation, breeding :: Breeding, selection :: Selection } step :: [PopulationChange] -> RVar Populat...
Use mutation, selection, breeding in order, that limits population size after each round
Use mutation, selection, breeding in order, that limits population size after each round
Haskell
bsd-3-clause
satai/FrozenBeagle
f53fa15f0683041d9864616bb608d57a60906434
src/MB/Gladtex.hs
src/MB/Gladtex.hs
module MB.Gladtex ( gladTex , checkForGladtex ) where import System.Exit ( ExitCode(..) , exitFailure ) import System.Process ( readProcessWithExitCode ) import Control.Monad ( when ) import MB.Types gladtexProgName :: String gladtexProgName = "gladtex" gladTex :: Config -> Fil...
module MB.Gladtex ( gladTex , checkForGladtex ) where import System.Exit ( ExitCode(..) , exitFailure ) import System.Process ( readProcessWithExitCode ) import Control.Monad ( when ) import MB.Types gladtexProgName :: String gladtexProgName = "gladtex" gladTex :: Config -> Fil...
Use baseUrl when invoking gladtex
Use baseUrl when invoking gladtex Ignore-this: 4662441800457a491c06b96ad3b4a21d darcs-hash:20101017010940-e018d-af578ff3bd0f77347f81ce972ec0fd29efbe5512.gz
Haskell
bsd-3-clause
jtdaugherty/mathblog
8777af3b4341530d8d1575b34df86d30c505b0a4
tests/suite/trace-heap/run/TraceHeap1.hs
tests/suite/trace-heap/run/TraceHeap1.hs
import Data.Char import Debug.Trace fibs :: [Integer] fibs = 1 : 1 : zipWith (+) fibs (tail fibs) main :: IO () main = do let transformedString = map (traceHeapId . toUpper) "Hello World!" traceHeapIdIO $ transformedString print $ take 3 transformedString traceHeapIdIO $ transformedString print $ transforme...
import Data.Char import Debug.Trace import Data.Function fibs :: [Integer] fibs = 1 : 1 : zipWith (+) fibs (tail fibs) main :: IO () main = do let transformedString = map (traceHeapId . toUpper) "Hello World!" traceHeapIdIO $ transformedString print $ take 3 transformedString traceHeapIdIO $ transformedString...
Include fix in trace-heap test case
Include fix in trace-heap test case
Haskell
bsd-3-clause
rahulmutt/ghcvm,rahulmutt/ghcvm,rahulmutt/ghcvm,rahulmutt/ghcvm,rahulmutt/ghcvm
a7e13b759676dc948615cd02441125a1a90de2f8
ptk/Ptk/Journal/List.hs
ptk/Ptk/Journal/List.hs
-- -*- hindent-style: "chris-done" -*- -- -- I prefer the Gibiansky style, but it is creating invalid ASTs from -- the code below. See https://github.com/chrisdone/hindent/issues/38 -- . The Chris Done style is my second favorite, so we'll go with that -- for the time being. {- | Module : Ptk.Journal.List Descr...
{- | Module : Ptk.Journal.List Description : `ptk journal list` command tree Copyright : 2014, Peter Harpending License : BSD3 Maintainer : Peter Harpending <pharpend2@gmail.com> Stability : experimental Portability : Linux -} module Ptk.Journal.List (journalListTree, journalListHelp) where impo...
Switch back to Gibiansky style.
Switch back to Gibiansky style. There was a bug in HIndent, the pretty-printer I use for the indentation. The Gibiansky HIndent style was generating an invalid AST, so I temporarily switched to another style. The bug is now fixed, so I can go back to the Gibiansky style. https://github.com/chrisdone/hindent/issues/38...
Haskell
bsd-3-clause
pharpend/puffytools
3e2173656cf3c5f051242fe512e6547d6302c015
src/ghc-specific/AxiomUtils.hs
src/ghc-specific/AxiomUtils.hs
{- - Copyright (c) 2017 The Agile Monkeys S.L. <hackers@theam.io> - - Licensed under the Apache License, Version 2.0 (the "License"); - you may not use this file except in compliance with the License. - You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - - Unless requir...
{- - Copyright (c) 2017 The Agile Monkeys S.L. <hackers@theam.io> - - Licensed under the Apache License, Version 2.0 (the "License"); - you may not use this file except in compliance with the License. - You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - - Unless requir...
Remove redundnt constraint breaking build due to -Werror
Remove redundnt constraint breaking build due to -Werror
Haskell
apache-2.0
theam/haskell-do,J2RGEZ/haskell-do,theam/haskell-do
d1323c7e4039eb614c12bc8dfe3db811338f2e09
app/Main.hs
app/Main.hs
{-# LANGUAGE OverloadedStrings #-} module Main where import Network.Wai.Handler.Warp (run) import Network.Wai.Middleware.RequestLogger import Network.HTTP.Client (newManager) import Network.HTTP.Client.TLS (tlsManagerSettings) import ...
{-# LANGUAGE OverloadedStrings #-} module Main where import System.IO import Network.Wai.Handler.Warp (run) import Network.Wai.Middleware.RequestLogger import Network.HTTP.Client (newManager) import Network.HTTP.Client.TLS (...
Print error message to stderr
Print error message to stderr
Haskell
mit
UlfS/ghmm
46e2041f1dc467e311dd05bd05caa88824969783
src/Language/K3/Effects/Core.hs
src/Language/K3/Effects/Core.hs
{-# LANGUAGE TypeFamilies #-} -- | Data Representations for K3 Effects module Language.K3.Effects.Core where import Language.K3.Core.Annotation import Language.K3.Core.Common data EffectKind = FAtom | FSymbol | FFunction deriving (Eq, Read, Show) data instance Annotation EffectKind = KAnnotation deriv...
{-# LANGUAGE TypeFamilies #-} -- | Data Representations for K3 Effects module Language.K3.Effects.Core where import Language.K3.Core.Annotation import Language.K3.Core.Common data Kind = FAtom | FSymbol | FFunction deriving (Eq, Read, Show) data instance Annotation EffectKind = KAnnotation deriving (E...
Rename EffectKind -> Kind for consistency.
Rename EffectKind -> Kind for consistency. Use qualified imports for disambiguation.
Haskell
apache-2.0
yliu120/K3,DaMSL/K3,DaMSL/K3
69ee45d33b78dd186ea9fe6327e4737a98d976a4
testsuite/tests/ghc-regress/mdo/should_run/mdo001.hs
testsuite/tests/ghc-regress/mdo/should_run/mdo001.hs
{-# OPTIONS -fglasgow-exts #-} module Main(main) where import Control.Monad.Fix import Data.Array.IO import Monad norm a = mdo s <- ioaA 1 s 0 return () where (_, sz) = bounds a ioaA i s acc | i > sz = return acc | True = do v <- readArray a i writeArray a i (v / s) ...
{-# OPTIONS -fglasgow-exts #-} module Main(main) where import Control.Monad.Fix import Data.Array.IO import Monad norm a = mdo (_, sz) <- getBounds a s <- ioaA 1 s sz 0 return () where ioaA i s sz acc | i > sz = return acc | True = do v <- readArray a i writeArray ...
Fix some Array.bounds calls to Array.getBounds
Fix some Array.bounds calls to Array.getBounds
Haskell
bsd-3-clause
nushio3/ghc,mfine/ghc,christiaanb/ghc,gridaphobe/ghc,sgillespie/ghc,acowley/ghc,spacekitteh/smcghc,sdiehl/ghc,sgillespie/ghc,olsner/ghc,gridaphobe/ghc,GaloisInc/halvm-ghc,gridaphobe/ghc,da-x/ghc,TomMD/ghc,siddhanathan/ghc,AlexanderPankiv/ghc,ryantm/ghc,sgillespie/ghc,siddhanathan/ghc,jstolarek/ghc,anton-dessiatov/ghc,h...
eb7e88af762cc0c531e0c0b70962805b8f1f9b5a
src/Main.hs
src/Main.hs
{-# LANGUAGE RecordWildCards, DeriveDataTypeable, CPP, ScopedTypeVariables #-} -- | The application entry point module Main(main) where import System.Console.CmdArgs import Language.Haskell.GhcidProgram import Language.Haskell.Ghcid.Util #if defined(mingw32_HOST_OS) foreign import stdcall unsafe "windows.h GetConso...
{-# LANGUAGE RecordWildCards, DeriveDataTypeable, CPP, ScopedTypeVariables #-} -- | The application entry point module Main(main) where import System.Console.CmdArgs import Control.Monad import Language.Haskell.GhcidProgram import Language.Haskell.Ghcid.Util #if defined(mingw32_HOST_OS) foreign import stdcall unsaf...
Add back a missing import (needed on Windows)
Add back a missing import (needed on Windows)
Haskell
bsd-3-clause
ndmitchell/ghcid
60c6f60afcfea14fcc9205e99e39e23a6d6b6c5a
src/Evolution.hs
src/Evolution.hs
module Evolution(EvolutionRules(EvolutionRules, mutation, breeding, selection), evolution) where import Data.Random import Data.Functor import Population data EvolutionRules = EvolutionRules { mutation :: Mutation, breeding :: Breeding, selection :: Selection } step :: [PopulationChange] -> RVar Populat...
module Evolution(EvolutionRules(EvolutionRules, mutation, breeding, selection), evolution) where import Data.Random import Data.Functor import Population data EvolutionRules = EvolutionRules { mutation :: Mutation, breeding :: Breeding, selection :: Selection } step :: [PopulationChange] -> RVar Populat...
Refactor to more idiomatic code
Refactor to more idiomatic code
Haskell
bsd-3-clause
satai/FrozenBeagle
2d8fe4e595a7fc91da8d1d1acf76c6af38b76b7f
Main.hs
Main.hs
module Main where import System.Environment import Parse import Regex main :: IO () main = do args <- getArgs case length args of 2 -> case parseRegex $ head args of Left err -> print err Right reg -> print $ matches reg $ head $ tail args _ -> print "Wrong numb...
module Main where import System.Environment import Parse import Regex main :: IO () main = do args <- getArgs case length args of 2 -> case parseRegex $ head args of Left err -> print err Right reg -> print $ matches reg $ head $ tail args _ -> putStrLn "Wrong n...
Fix output displayed for wrong number of arguments
Fix output displayed for wrong number of arguments
Haskell
bsd-2-clause
eneas193933/regex-derivatives,dwnusbaum/regex-derivatives
a992cec5875cab7ec014df3a3ebba912baac8f18
Distribution/Compat/Exception.hs
Distribution/Compat/Exception.hs
{-# OPTIONS -cpp #-} -- OPTIONS required for ghc-6.4.x compat, and must appear first {-# LANGUAGE CPP #-} {-# OPTIONS_GHC -cpp #-} {-# OPTIONS_NHC98 -cpp #-} {-# OPTIONS_JHC -fcpp #-} #if !defined(__GLASGOW_HASKELL__) || (__GLASGOW_HASKELL__ >= 609) #define NEW_EXCEPTION #endif module Distribution.Compat.Exception ...
{-# OPTIONS -cpp #-} -- OPTIONS required for ghc-6.4.x compat, and must appear first {-# LANGUAGE CPP #-} {-# OPTIONS_GHC -cpp #-} {-# OPTIONS_NHC98 -cpp #-} {-# OPTIONS_JHC -fcpp #-} #if !defined(__GLASGOW_HASKELL__) || (__GLASGOW_HASKELL__ >= 609) #define NEW_EXCEPTION #endif module Distribution.Compat.Exception ...
Simplify the compat exceptions stuff
Simplify the compat exceptions stuff
Haskell
bsd-3-clause
IreneKnapp/Faction,IreneKnapp/Faction
09b9457b5c23d4bf9c9afaa863ee0aa71082fa24
src/Compiler/Hoopl.hs
src/Compiler/Hoopl.hs
module Compiler.Hoopl ( module Compiler.Hoopl.Graph , module Compiler.Hoopl.MkGraph , module Compiler.Hoopl.XUtil , module Compiler.Hoopl.Dataflow , module Compiler.Hoopl.Label , module Compiler.Hoopl.Unique , module Compiler.Hoopl.Pointed , module Compiler.Hoopl.Combinators , module Compiler.Hoopl.Fu...
module Compiler.Hoopl ( module Compiler.Hoopl.Graph , module Compiler.Hoopl.MkGraph , module Compiler.Hoopl.XUtil , module Compiler.Hoopl.Dataflow , module Compiler.Hoopl.Label , module Compiler.Hoopl.Unique , module Compiler.Hoopl.Pointed , module Compiler.Hoopl.Combinators , module Compiler.Hoopl.Fu...
Make body abstract for library clients.
Make body abstract for library clients.
Haskell
bsd-3-clause
hvr/hoopl,hvr/hoopl,ezyang/hoopl
db58e7ab597bdb03bba3fc2d51d99dfb4b9e1986
Eval.hs
Eval.hs
module Eval where import Parse funcop :: Integral a => OP -> a -> a -> a funcop Plus = (+) funcop Minus = (-) funcop Mul = (*) funcop Div = div eval :: Tree -> Integer eval (Num x) = x eval (Operator op left right) = let l = eval left r = eval right f = funcop op in f l r
module Eval where import Parse funcop :: OP -> Integer -> Integer -> Integer funcop Plus = (+) funcop Minus = (-) funcop Mul = (*) funcop Div = div funcop Eq = apply (==) funcop Ne = apply (/=) funcop Gt = apply (>) funcop Lt = apply (<) funcop Le = apply (<=) funcop Ge = apply (>=) apply f l r = let b = f l r ...
Add comparison operations to the evaluator
Add comparison operations to the evaluator
Haskell
mit
d16-processor/Haskell-C-,d16-processor/Haskell-C-
ea6412967c145a5d02cb4aae74a4d466694af332
Save.hs
Save.hs
module Save ( save , retrieve ) where import Core import Binary import Data.Binary import qualified Data.ByteString.Lazy as L import Control.Applicative ((<$>)) save :: FilePath -> IRCState -> IO () save fp = L.writeFile fp . encode retrieve :: FilePath -> IO IRCState retrieve fp = decode <$...
module Save ( save , retrieve ) where import Core import Binary import Data.Binary import qualified Data.ByteString.Lazy as L import qualified Data.ByteString as B import Control.Applicative ((<$>)) save :: FilePath -> IRCState -> IO () save fp = B.writeFile fp . L.toStrict . encode retrieve...
Use strict file writing for saving
Use strict file writing for saving This prevents us from trying to write to the save file while we are reading it.
Haskell
mit
jchmrt/btjchm
5ef4c928128eab936ff61f724f1d581ba5a7f490
src/Text/Karver/Types.hs
src/Text/Karver/Types.hs
module Text.Karver.Types where import Data.Text (Text) import Data.HashMap.Strict import Data.Vector type ObjectName = Text type Key = Text type ListName = Text type Index = Int type Compare = Text type IfBody = Text type ElseBody = Text data Tokens = LiteralTok Text | Identity...
module Text.Karver.Types where import Data.Text (Text) import Data.HashMap.Strict import Data.Vector type ObjectName = Text type Key = Text type ListName = Text type Index = Int type Compare = Text type IfBody = Text type ElseBody = Text type Element = Text type LoopBody = Text data To...
Change the last of the Tokens
Change the last of the Tokens
Haskell
bsd-3-clause
ibotty/stencil,sourrust/karver
7e7a9fcdd58593b20be3f7080da348fe7f9694ee
src-lib/PTS/Transform.hs
src-lib/PTS/Transform.hs
module PTS.Transform ( transform ) where import Control.Monad.Trans (liftIO) import Parametric.Error (showErrors) import PTS.AST (TypedTerm) import PTS.Parser (parseTerm) import PTS.Pretty () import System.IO (hPutStrLn, stderr) import System.Exit (exitSuccess, exitFailure) import Tools.Errors (runErrorsT) tr...
module PTS.Transform ( transform ) where import Control.Monad.Trans (liftIO) import Parametric.Error (showErrors) import PTS.AST (TypedTerm) import PTS.Parser (parseTerm) import PTS.Pretty () import System.IO (hPutStrLn, stderr) import System.Exit (exitSuccess, exitFailure) import Tools.Errors (runErrorsT) ru...
Isolate monad stack juggling from program logic.
Isolate monad stack juggling from program logic.
Haskell
bsd-3-clause
Toxaris/pts,Blaisorblade/pts
1fbf58bf49483fa13d2b29c8da1574e8a0a5cf4f
hs-to-coq/src/lib/HsToCoq/ConvertHaskell/Declarations/TypeSynonym.hs
hs-to-coq/src/lib/HsToCoq/ConvertHaskell/Declarations/TypeSynonym.hs
{-# LANGUAGE FlexibleContexts #-} module HsToCoq.ConvertHaskell.Declarations.TypeSynonym (SynBody(..), convertSynDecl) where import Prelude hiding (Num) import Control.Lens import GHC hiding (Name) import HsToCoq.Coq.Gallina as Coq import HsToCoq.Coq.Gallina.Util import HsToCoq.Coq.FreeVars import HsToCoq.Convert...
{-# LANGUAGE FlexibleContexts, OverloadedStrings #-} module HsToCoq.ConvertHaskell.Declarations.TypeSynonym (SynBody(..), convertSynDecl) where import Prelude hiding (Num) import Control.Lens import GHC hiding (Name) import HsToCoq.Coq.Gallina as Coq import HsToCoq.Coq.Gallina.Util import HsToCoq.Coq.FreeVars imp...
Put type synonyms in the type scope
[core-coq] Put type synonyms in the type scope
Haskell
mit
antalsz/hs-to-coq,antalsz/hs-to-coq
9998821d17de1a4c8453f24e3677706a8437040d
code/Example/Drasil/GamePhysics/Concepts.hs
code/Example/Drasil/GamePhysics/Concepts.hs
module Drasil.GamePhysics.Concepts where import Language.Drasil import Data.Drasil.Concepts.Documentation import Data.Drasil.Concepts.Math ----- Acronyms ----- centreMass, twoD :: CINP cpAcronyms :: [CINP] cpAcronyms = [assumption, centreMass, dataDefn, genDefn, goalStmt, inModel, likelyChg, ode, requirement, s...
module Drasil.GamePhysics.Concepts where import Language.Drasil import Data.Drasil.Concepts.Documentation import Data.Drasil.Concepts.Math ----- Acronyms ----- centreMass, twoD :: CINP cpAcronyms :: [CINP] cpAcronyms = [assumption, centreMass, dataDefn, genDefn, goalStmt, inModel, likelyChg, ode, requirement, s...
Update cent_Mass with updated smart constructor. Now all examples compile again, but are not yet stable.
Update cent_Mass with updated smart constructor. Now all examples compile again, but are not yet stable.
Haskell
bsd-2-clause
JacquesCarette/literate-scientific-software,JacquesCarette/literate-scientific-software,JacquesCarette/literate-scientific-software,JacquesCarette/literate-scientific-software,JacquesCarette/literate-scientific-software,JacquesCarette/literate-scientific-software,JacquesCarette/literate-scientific-software
43b5f077a9e44b1cc9a557b81699ff583abacaa1
spec/AppHandlerSpec.hs
spec/AppHandlerSpec.hs
module AppHandlerSpec ( appHandlerSpec ) where import qualified Data.Text as T import Snap import qualified Snap.Snaplet.Test as SST import qualified Snap.Test as ST import Test.Hspec import Wikirick.Application import qualified Wikirick.Backends.Repository as R import Wikirick.Import import qualified Wikirick.Si...
module AppHandlerSpec ( appHandlerSpec ) where import qualified Data.Text as T import Snap import qualified Snap.Snaplet.Test as SST import qualified Snap.Test as ST import qualified System.Directory as D import Test.Hspec import Wikirick.Application import qualified Wikirick.Backends.Repository as R import Wikir...
Remove the temporary session file after testing
Remove the temporary session file after testing
Haskell
bsd-3-clause
keitax/wikirick
d3386bead33f17383d80da81b45723e68ec27efc
sparkle/src/Foreign/Java/Types.hs
sparkle/src/Foreign/Java/Types.hs
{-# LANGUAGE GeneralizedNewtypeDeriving #-} module Foreign.Java.Types where import Foreign.C import Foreign.Ptr import Foreign.Storable (Storable(..)) newtype JVM = JVM (Ptr JVM) deriving (Eq, Show, Storable) newtype JNIEnv = JNIEnv (Ptr JNIEnv) deriving (Eq, Show, Storable) newtype JObject = JObject (Ptr JObj...
{-# LANGUAGE GeneralizedNewtypeDeriving #-} module Foreign.Java.Types where import Foreign.C import Foreign.Ptr import Foreign.Storable (Storable(..)) newtype JVM = JVM (Ptr JVM) deriving (Eq, Show, Storable) newtype JNIEnv = JNIEnv (Ptr JNIEnv) deriving (Eq, Show, Storable) newtype JObject = JObject (Ptr JObj...
Make JClass a type synonym for JObject.
Make JClass a type synonym for JObject. Since jclass is just a typedef for jobject according to the JNI spec.
Haskell
bsd-3-clause
tweag/sparkle,tweag/sparkle
043bb109944c628bd535c664da61839ae636b990
app/PSGenerator.hs
app/PSGenerator.hs
{-# LANGUAGE OverloadedStrings #-} import Language.PureScript.Bridge import Control.Lens import Data.Proxy import GHC.Generics import Servant.PureScript import Gonimo.CodeGen.TypeBridges import Gonimo.Server.DbEntities import Gonimo.WebAPI import ...
{-# LANGUAGE OverloadedStrings #-} import Language.PureScript.Bridge import Control.Lens import Data.Proxy import GHC.Generics import Servant.PureScript import Gonimo.CodeGen.TypeBridges import Gonimo.Server.DbEntities import Gonimo.WebAPI import ...
Fix header name in code generation
Fix header name in code generation
Haskell
agpl-3.0
gonimo/gonimo-back
de60e64e34cf0e80f50726e3c0d237782edcfce1
server/Messager.hs
server/Messager.hs
module Messager where import ServerMonad import Builder.Utils import Control.Concurrent.MVar import Control.Monad import System.IO messager :: Directory -> Maybe (FilePath, Maybe Handle) -> Verbosity -> IO () messager directory (Just (fp, Nothing)) v = do h <- openFile fp AppendMode messager directory (Just ...
module Messager where import ServerMonad import Builder.Utils import Control.Concurrent.MVar import Control.Monad import System.IO messager :: Directory -> Maybe (FilePath, Maybe Handle) -> Verbosity -> IO () messager directory (Just (fp, Nothing)) v = do h <- openFile fp AppendMode hSetBuffering h LineBuffe...
Set the log file to be line buffered
Set the log file to be line buffered
Haskell
bsd-3-clause
haskell/ghc-builder,bgamari/ghc-builder
3836a92c1efdaf43be35bc7bd941ccab77481d5c
src-web/hs/Main.hs
src-web/hs/Main.hs
{-# LANGUAGE OverloadedStrings #-} module Main where import Control.Monad.State.Lazy import Data.Foldable as Foldable import React import React.GHCJS import Cochon.Model import Cochon.View import DisplayLang.PrettyPrint import Elaboration.Error import Evidences.Tm import Kit.BwdFwd import ProofState.Edition.ProofCon...
{-# LANGUAGE OverloadedStrings #-} module Main where import Control.Monad.State.Lazy import Data.Foldable as Foldable import React import React.GHCJS import Cochon.Model import Cochon.View import DisplayLang.PrettyPrint import Elaboration.Error import Evidences.Tm import Kit.BwdFwd import ProofState.Edition.ProofCon...
Update for new version of react-haskell.
Update for new version of react-haskell.
Haskell
mit
kwangkim/pigment,kwangkim/pigment,kwangkim/pigment
cc2ce8ee3840fe977d7ec439a3a9b748c1478985
src/MB/Defaults.hs
src/MB/Defaults.hs
module MB.Defaults ( preamble , postamble , stylesheet , firstPost ) where preamble :: String preamble = "<html>\n\ \ <head>\n\ \ <title>A Blog</title>\n\ \ <link rel=\"stylesheet\" type=\"text/css\" href=\"/stylesheets/stylesheet.css\"/>\n\ \ </h...
module MB.Defaults ( preamble , postamble , stylesheet , firstPost ) where preamble :: String preamble = "<html>\n\ \ <head>\n\ \ <title>A Blog</title>\n\ \ <link rel=\"stylesheet\" type=\"text/css\" href=\"/stylesheets/stylesheet.css\"/>\n\ \ </h...
Add default first post content
Add default first post content Ignore-this: de8889bc57f5940df51c474019df8905 darcs-hash:20100731015406-e018d-2d689decdfa3a7d3b0bfe5c8d8f12898e0aeb1e6.gz
Haskell
bsd-3-clause
jtdaugherty/mathblog
9f0a064844f90f163610cf95825c4955b9eeb8cf
code/Language/Drasil/People.hs
code/Language/Drasil/People.hs
module Language.Drasil.People (People, Person, person, HasName, name, twoNames, manyNames) where import Language.Drasil.Spec (Sentence(S,(:+:)),(+:+), sC) data Person = Person { _first :: String, _last :: String, _name :: Sentence} type People = [Person] person :: String -> String -> Person person f l = Person f l ...
module Language.Drasil.People (People, Person, person, HasName, name, manyNames) where import Language.Drasil.Spec (Sentence(S,(:+:)),(+:+), sC) data Person = Person { _first :: String, _last :: String, _name :: Sentence} type People = [Person] person :: String -> String -> Person person f l = Person f l (S $ f ++ ...
Remove twoNames, it is no longer necessary thanks to the updated manyNames.
Remove twoNames, it is no longer necessary thanks to the updated manyNames.
Haskell
bsd-2-clause
JacquesCarette/literate-scientific-software,JacquesCarette/literate-scientific-software,JacquesCarette/literate-scientific-software,JacquesCarette/literate-scientific-software,JacquesCarette/literate-scientific-software,JacquesCarette/literate-scientific-software,JacquesCarette/literate-scientific-software
e1854fcd6ba9c6e69ec0213ddf6ff8939f08e8e4
src/GitHUD/Terminal/Types.hs
src/GitHUD/Terminal/Types.hs
module GitHUD.Terminal.Types ( Color(..) , ColorIntensity(..) , Shell(..) , ShellOutput(..) ) where import Control.Monad.Reader data Color = Black | Red | Green | Yellow | Blue | Magenta | Cyan | White data ColorIntensity = Dull | Vivid data Shell = ZSH | Other deriving (Eq) type ShellOutput = ReaderT Shell...
module GitHUD.Terminal.Types ( Color(..) , ColorIntensity(..) , Shell(..) , Prompt(..) , ShellOutput ) where import Control.Monad.Reader data Color = Black | Red | Green | Yellow | Blue | Magenta | Cyan | White data ColorIntensity = Dull | Vivid data Shell = ZSH | Other deriving (Eq) data Prompt = Prompt...
Add a Prompt state data type
[Feature] Add a Prompt state data type
Haskell
bsd-3-clause
gbataille/gitHUD
64fa1b41993f14c523e61936588522bc9f15129c
exercises/pig-latin/src/Example.hs
exercises/pig-latin/src/Example.hs
module PigLatin (translate) where import Data.Char (isLetter) import Data.List (isSuffixOf) consonantCluster :: String -> (String, String) consonantCluster = qu . break (`elem` "aeiou") where qu (cs, ('u':rest)) | "q" `isSuffixOf` cs = (cs ++ "u", rest) qu pair = pair translateWord :: String -> String trans...
module PigLatin (translate) where import Data.Char (isLetter) import Data.List (isSuffixOf) consonantCluster :: String -> (String, String) consonantCluster = qu . break (`elem` "aeiou") where qu (cs, ('u':rest)) | "q" `isSuffixOf` cs = (cs ++ "u", rest) qu pair = pair translateWord :: String -> String trans...
Patch the example solution to pass the new tests.
pig-latin: Patch the example solution to pass the new tests.
Haskell
mit
exercism/xhaskell
aacbe26262c168701e06797e7ddae34d0115b0ad
funflow/test/Spec.hs
funflow/test/Spec.hs
import FunFlow.Lib import FunFlow.TypeSystem examples :: [(String, Type)] examples = [ ("add", TypeInteger) , ("apply_id", TypeInteger) , ("id", TypeFn (Alpha 0) (Alpha 0)) , ("if_let", TypeInteger) , ("let_bool", TypeBool) , ("let_id", TypeFn (Alpha 0) (Alpha 0))...
import FunFlow.Lib import FunFlow.TypeSystem examples :: [(String, Type)] examples = [ ("add", TypeInteger) , ("apply_id", TypeInteger) , ("id", TypeFn (Alpha 0) (Alpha 0)) , ("fun_id", TypeFn (Alpha 0) (Alpha 0)) , ("fun_if", TypeFn (Alpha 0) (Alpha 0)) , ("if_le...
Add missing examples to tests
Add missing examples to tests
Haskell
apache-2.0
aochagavia/CompilerConstruction
c01b693e655ce146e8be281b2dda93a64a7d4bca
src/Propellor/Property/LightDM.hs
src/Propellor/Property/LightDM.hs
{-# LANGUAGE FlexibleInstances #-} -- | Maintainer: Sean Whitton <spwhitton@spwhitton.name> module Propellor.Property.LightDM where import Propellor.Base import qualified Propellor.Property.ConfFile as ConfFile -- | Configures LightDM to skip the login screen and autologin as a user. autoLogin :: User -> Property N...
{-# LANGUAGE FlexibleInstances #-} -- | Maintainer: Sean Whitton <spwhitton@spwhitton.name> module Propellor.Property.LightDM where import Propellor.Base import qualified Propellor.Property.Apt as Apt import qualified Propellor.Property.ConfFile as ConfFile installed :: Property NoInfo installed = Apt.installed ["l...
Add convenience .installed for lightdm.
Add convenience .installed for lightdm. Signed-off-by: Jelmer Vernooij <9648816b5a0c45426c88e14104568baf9283dd28@jelmer.uk>
Haskell
bsd-2-clause
ArchiveTeam/glowing-computing-machine
8cd170bcc5902e1e68ef36e4c3e73868033fcc6b
Network/WReq/Lens/Internal.hs
Network/WReq/Lens/Internal.hs
{-# LANGUAGE TemplateHaskell #-} {-# OPTIONS_GHC -fno-warn-missing-signatures #-} module Network.WReq.Lens.Internal ( HTTP.Request , method , secure , host , port , path , queryString , requestHeaders , requestBody , proxy , hostAddress , rawBody , decompress ...
{-# LANGUAGE RankNTypes, TemplateHaskell #-} {-# OPTIONS_GHC -fno-warn-missing-signatures #-} module Network.WReq.Lens.Internal ( HTTP.Request , method , secure , host , port , path , queryString , requestHeaders , requestBody , proxy , hostAddress , rawBody , ...
Write more idiomatic definitions of assoc and assoc2
Write more idiomatic definitions of assoc and assoc2 --HG-- extra : amend_source : 6b53bd830a99792bcf45220e7265a57a38d4d052
Haskell
bsd-3-clause
bitemyapp/wreq,bos/wreq,Feeniks/wreq,k-bx/wreq
bac1b793318be06d0375091c18b89e40f6b39d37
Numeric/Classes/Indexing.hs
Numeric/Classes/Indexing.hs
{-# LANGUAGE TypeFamilies #-} module Numeric.Classes.Indexing ( Indexable(..) ) where import qualified Data.Vector as V import qualified Data.Vector.Unboxed as U import qualified Data.Vector.Storable as S -- | class Indexable a where type IndexVal a :: * -- | Size of table size :: a -...
{-# LANGUAGE TypeFamilies #-} module Numeric.Classes.Indexing ( Indexable(..) , validIndex ) where import qualified Data.Vector as V import qualified Data.Vector.Unboxed as U import qualified Data.Vector.Storable as S -- | class Indexable a where type IndexVal a :: * -- | Size of table siz...
Add function to check validity of index
Add function to check validity of index
Haskell
bsd-3-clause
Shimuuar/numeric-tools
60b09dc4ec2b2d57ce0155ea46ca2276880852fb
src/Language/K3/Codegen/CPP/Representation.hs
src/Language/K3/Codegen/CPP/Representation.hs
{-# LANGUAGE OverloadedStrings #-} module Language.K3.Codegen.CPP.Representation where import Data.String import Text.PrettyPrint.ANSI.Leijen hiding ((<$>)) class Stringifiable a where stringify :: a -> Doc data Name = Name Identifier | Qualified Identifier Name | Specialized [Type] Name deriving...
{-# LANGUAGE OverloadedStrings #-} module Language.K3.Codegen.CPP.Representation where import Data.String import Text.PrettyPrint.ANSI.Leijen hiding ((<$>)) class Stringifiable a where stringify :: a -> Doc data Name = Name Identifier | Qualified Identifier Name | Specialized [Type] Name deriving...
Define AST fragment for expressions.
Define AST fragment for expressions.
Haskell
apache-2.0
DaMSL/K3,DaMSL/K3,yliu120/K3
590cc0d4bb5e8671adccb077277e9e41f77fd90e
src/Snap/Snaplet/Config.hs
src/Snap/Snaplet/Config.hs
{-# LANGUAGE OverloadedStrings #-} module Snap.Snaplet.Config where import Data.Function import Data.Maybe import Data.Monoid import Snap.Core import Snap.Http.Server.Config import System.Console.GetOpt ------------------------------------------------------------------------------ -- | AppConfig contains the config ...
{-# LANGUAGE OverloadedStrings #-} module Snap.Snaplet.Config where import Data.Function import Data.Maybe import Data.Monoid import Snap.Core import Snap.Http.Server.Config import System.Console.GetOpt ------------------------------------------------------------------------------ -- | AppConfig contains the config ...
Leverage monoid instance to simplify code. Added documentation.
Leverage monoid instance to simplify code. Added documentation.
Haskell
bsd-3-clause
sopvop/snap,23Skidoo/snap,bitemyapp/snap,snapframework/snap
02052a9fff548a6a314e58e21baa79b40a3bb772
src/Test/History.hs
src/Test/History.hs
module Test.History(main) where import Development.Shake import Test.Type import General.GetOpt import System.Directory import Data.List import Control.Monad import Prelude data Args = Die deriving (Eq,Enum,Bounded,Show) main = shakeTest test optionsEnum $ \args -> "B.txt" %> \out -> do when (Die `elem`...
{-# LANGUAGE TypeFamilies #-} module Test.History(main) where import Development.Shake import Test.Type import General.GetOpt import System.Directory import Data.List import Control.Monad import Prelude data Args = Die deriving (Eq,Enum,Bounded,Show) type instance RuleResult FilePath = String main = shakeTest test...
Add a test that store oracles get cached
Add a test that store oracles get cached
Haskell
bsd-3-clause
ndmitchell/shake,ndmitchell/shake,ndmitchell/shake,ndmitchell/shake,ndmitchell/shake,ndmitchell/shake
75ea9e1795c8af51dc63e0ddb6ded38ee787d665
Example.hs
Example.hs
module Example where import Array int0 = 0 :: Int int1 = 1 :: Int main0 xs = map head xs main1 x = neq x neq = not . eq eq x = x == (0::Int) main2 x y = neq2 (x::Int) y neq2 x y = not (x == y) main3 xs = (a . b . c) xs a x = x+(1::Int) b x = x*(4::Int) c x = x-(3::Int) main4 x = even (x :: Int) main5 x =...
module Example where import Array int0 = 0 :: Int int1 = 1 :: Int main0 xs = map head xs main1 x = neq x neq = not . eq eq x = x == (0::Int) main2 x y = neq2 (x::Int) y neq2 x y = not (x == y) main3 xs = (a . b . c) xs a x = x+(1::Int) b x = x*(4::Int) c x = x-(3::Int) main4 x = even (x :: Int) main5 x =...
Fix the failing example to really fail
Fix the failing example to really fail
Haskell
bsd-3-clause
ndmitchell/firstify
cf705666d717b7ae347cea1f92d3acda9deec4d7
src/Text/Karver/Types.hs
src/Text/Karver/Types.hs
module Text.Karver.Types where import Data.Text (Text) import Data.HashMap.Strict import Data.Vector type Key = Text data Tokens = LiteralTok Text | IdentityTok Text | ObjectTok Text Key | ListTok Text Int | ConditionTok Text Text Text deriving (...
module Text.Karver.Types where import Data.Text (Text) import Data.HashMap.Strict import Data.Vector type Key = Text data Tokens = LiteralTok Text | IdentityTok Text | ObjectTok Text Key | ListTok Text Int | ConditionTok Text Text Text | LoopTok ...
Add LoopTok for loop statements storage
Add LoopTok for loop statements storage
Haskell
bsd-3-clause
ibotty/stencil,sourrust/karver
64605d106e10de2d6ce9471065c23ceb53122586
tests/configs/Compdef.hs
tests/configs/Compdef.hs
{-# LANGUAGE OverloadedStrings #-} module Compdef where import Antigen import Shelly (shelly) bundles = [ (developFromFileSystem "/tmp/antigen-hs/tests/repos/compdef") { sourcingStrategy = antigenSourcingStrategy, fpathLocations = ["etc"] } ] config = AntigenConfiguration bundles main :: IO () m...
{-# LANGUAGE OverloadedStrings #-} module Compdef where import Antigen import Shelly (shelly) bundles = [ (local "/tmp/antigen-hs/tests/repos/compdef") { sourcingStrategy = antigenSourcingStrategy, fpathLocations = ["etc"] } ] config = AntigenConfiguration bundles main :: IO () main = shelly $ a...
Update reference to `developFromFileSystem` in tests.
Update reference to `developFromFileSystem` in tests.
Haskell
mit
Pitometsu/antigen-hs,Pitometsu/antigen-hs,Tarrasch/antigen-hs,Tarrasch/antigen-hs
9976882bd0db71b3b8dd93d887023ba93eea4a60
src/Compiler/TypeChecking/Unify.hs
src/Compiler/TypeChecking/Unify.hs
{-# LANGUAGE FlexibleContexts #-} module Compiler.TypeChecking.Unify where import Control.Monad import Control.Monad.Error import qualified Data.Set as Set import Data.Set (Set) import Compiler.AST import Compiler.TypeChecking.Error import Compiler.TypeChecking.Subst free :: Type -> Set TyVar free (TyData d) ...
{-# LANGUAGE FlexibleContexts #-} module Compiler.TypeChecking.Unify ( -- * Unification. unify ) where import Control.Monad import Control.Monad.Error import qualified Data.Set as Set import Data.Set (Set) import Compiler.AST import Compiler.TypeChecking.Error import Compiler.TypeChecking.Free i...
Remove duplicate definition of 'free'.
Remove duplicate definition of 'free'.
Haskell
bsd-3-clause
vituscze/norri
c7595fdb032b502bf372f8a98d8e75d8f48e84e7
test/Language/Haskell/Ghcid/UtilTest.hs
test/Language/Haskell/Ghcid/UtilTest.hs
-- | Test utility functions module Language.Haskell.Ghcid.UtilTest ( utilsTests ) where import Test.Tasty import Test.Tasty.HUnit import Language.Haskell.Ghcid.Util utilsTests :: TestTree utilsTests=testGroup "Utility tests" [ dropPrefixTests ] dropPrefixTests :: TestTree dropPrefixTests = testGroup "dro...
-- | Test utility functions module Language.Haskell.Ghcid.UtilTest ( utilsTests ) where import Test.Tasty import Test.Tasty.HUnit import Language.Haskell.Ghcid.Util utilsTests :: TestTree utilsTests=testGroup "Utility tests" [ dropPrefixTests ] dropPrefixTests :: TestTree dropPrefixTests = testGroup "dro...
Fix up the test suite
Fix up the test suite
Haskell
bsd-3-clause
ndmitchell/ghcid
183519d2483e2eeab0d0eaed100a380fa624139c
tests/tests.hs
tests/tests.hs
import Test.Framework (defaultMain) import qualified Tests.Distribution as Distribution import qualified Tests.Function as Function import qualified Tests.KDE as KDE import qualified Tests.Matrix as Matrix import qualified Tests.NonParametric as NonParametric import qualified Tests.Parametric as Parametric import quali...
import Test.Framework (defaultMain) import qualified Tests.Distribution import qualified Tests.Function import qualified Tests.KDE import qualified Tests.Matrix import qualified Tests.NonParametric import qualified Tests.Parametric import qualified Tests.Transform import qualified Tests.Correlation import qualified Te...
Rename some functions in test suite
Rename some functions in test suite
Haskell
bsd-2-clause
Shimuuar/statistics,bos/statistics,bos/statistics,Shimuuar/statistics
1b92ef8b2f79eae0a052a60ce85c9e0c18fb6f86
src/Game.hs
src/Game.hs
{-# LANGUAGE OverloadedStrings , DeriveGeneric #-} module Game where import Data.Aeson import GHC.Generics import Types import Cell import Unit import Command data Input = Input { id :: Number , units :: [Unit] , width :: Number , height :: Number ...
{-# LANGUAGE OverloadedStrings , DeriveGeneric , TypeSynonymInstances , FlexibleInstances #-} module Game where import Data.Aeson import GHC.Generics import Types import Cell import Unit import Command data Input = Input { id :: Number , units :: [Unit] , width :: Num...
Define Output and make it FromJSON,ToJSON instances
Define Output and make it FromJSON,ToJSON instances
Haskell
bsd-3-clause
msakai/icfpc2015,msakai/icfpc2015
857ef94623a1b246427861aaa7fd1f2d82d34bf9
src/Foreign/Inference/AnalysisMonad.hs
src/Foreign/Inference/AnalysisMonad.hs
{-# LANGUAGE GeneralizedNewtypeDeriving #-} module Foreign.Inference.AnalysisMonad ( AnalysisMonad, runAnalysis, module Control.Monad.RWS.Strict ) where import Control.Monad.RWS.Strict import Data.Lens.Common import Foreign.Inference.Diagnostics newtype AnalysisMonad env state a = AnalysisMonad { unAnalysi...
{-# LANGUAGE GeneralizedNewtypeDeriving #-} module Foreign.Inference.AnalysisMonad ( AnalysisMonad, runAnalysis, module Control.Monad.RWS.Strict ) where import Control.Monad.RWS.Strict import Data.Lens.Common import Foreign.Inference.Diagnostics newtype AnalysisMonad env st a = AnalysisMonad { unAnalysis :...
Fix a shadowed name warning
Fix a shadowed name warning
Haskell
bsd-3-clause
travitch/foreign-inference,travitch/foreign-inference
27a52df5a7ba11f1e9e39ec85ca62cb71f96901a
examples/hello-world/Main.hs
examples/hello-world/Main.hs
module Main where import qualified GHCJS.CommonJS as CommonJS main :: IO () main = CommonJS.exportMain [ CommonJS.pack ("sayHello", putStrLn "Hello, I'm a Haskell") ]
module Main where import GHCJS.CommonJS (exportMain, exports) main :: IO () main = exportMain [ "sayHello" `exports` putStrLn "Hello, I'm a Haskell" ]
Update hello-world to the latest API
Update hello-world to the latest API
Haskell
mit
beijaflor-io/ghcjs-commonjs,beijaflor-io/ghcjs-commonjs,beijaflor-io/ghcjs-commonjs