code stringlengths 5 1.03M | repo_name stringlengths 5 90 | path stringlengths 4 158 | license stringclasses 15
values | size int64 5 1.03M | n_ast_errors int64 0 53.9k | ast_max_depth int64 2 4.17k | n_whitespaces int64 0 365k | n_ast_nodes int64 3 317k | n_ast_terminals int64 1 171k | n_ast_nonterminals int64 1 146k | loc int64 -1 37.3k | cycloplexity int64 -1 1.31k |
|---|---|---|---|---|---|---|---|---|---|---|---|---|
module Misc where
import Data.List
import Data.Map (Map,keys,(!))
-- ---------------------------------------------------------------------
-- List-related functions ----------------------------------------------
-- ---------------------------------------------------------------------
-- A function that generates a s... | Booster2/Booster2 | Workflow_Precond/impl_nondisjoint/Misc.hs | bsd-3-clause | 2,828 | 0 | 13 | 684 | 747 | 401 | 346 | 37 | 2 |
module Haskus.Apps.System.Build.GMP
( gmpMain
)
where
import Haskus.Apps.System.Build.Utils
import Haskus.Utils.Flow
import System.IO.Temp
import System.Directory
import System.FilePath
gmpMain :: IO ()
gmpMain = do
appDir <- getAppDir
let
usrDir = appDir </> "usr"
gmpVer = "6.1.2"
l... | hsyl20/ViperVM | haskus-system-build/src/apps/Haskus/Apps/System/Build/GMP.hs | bsd-3-clause | 1,484 | 0 | 19 | 410 | 359 | 171 | 188 | 40 | 1 |
import MatrixTree ; import SpAMM ; import System.Directory (removeFile)
main = do testReadWrite ; testAdd ; testMultiply
testReadWrite = do tree1 <- mmReadTree "Matrices/rect4arr.txt"
mmWriteTree tree1 "coordinate" "Matrices/tempfile.txt"
tree2 <- mmReadTree "Matrices/tempfile.tx... | FreeON/spammpack | src-Haskell/Testing/tests.hs | bsd-3-clause | 5,611 | 0 | 12 | 2,138 | 953 | 460 | 493 | 89 | 2 |
{-# LANGUAGE Haskell98 #-}
{-# LINE 1 "Data/ByteString/Builder/Prim/Internal.hs" #-}
{-# LANGUAGE ScopedTypeVariables, CPP, BangPatterns #-}
{-# LANGUAGE Unsafe #-}
{-# OPTIONS_HADDOCK hide #-}
-- |
-- Copyright : 2010-2011 Simon Meier, 2010 Jasper van der Jeugt
... | phischu/fragnix | tests/packages/scotty/Data.ByteString.Builder.Prim.Internal.hs | bsd-3-clause | 8,685 | 0 | 12 | 1,683 | 1,507 | 850 | 657 | 105 | 2 |
-- Copyright (c) 2014-present, Facebook, Inc.
-- All rights reserved.
--
-- This source code is distributed under the terms of a BSD license,
-- found in the LICENSE file.
{-# LANGUAGE OverloadedStrings #-}
module TestUtils
( makeTestEnv
, expectRoundsWithEnv
, expectRounds
, expectFetches
, testinput
, id... | simonmar/Haxl | tests/TestUtils.hs | bsd-3-clause | 1,738 | 0 | 12 | 356 | 594 | 308 | 286 | 54 | 1 |
<?xml version="1.0" encoding="UTF-8"?><!DOCTYPE helpset PUBLIC "-//Sun Microsystems Inc.//DTD JavaHelp HelpSet Version 2.0//EN" "http://java.sun.com/products/javahelp/helpset_2_0.dtd">
<helpset version="2.0" xml:lang="ru-RU">
<title>Browser View | ZAP Extension</title>
<maps>
<homeID>top</homeID>
<mapref... | kingthorin/zap-extensions | addOns/browserView/src/main/javahelp/org/zaproxy/zap/extension/browserView/resources/help_ru_RU/helpset_ru_RU.hs | apache-2.0 | 984 | 78 | 66 | 159 | 433 | 218 | 215 | -1 | -1 |
{-# OPTIONS_GHC -Werror -O #-}
-- Add -O so the UNPACK has some effect
module T3966 where
data Foo a b = Foo {-# UNPACK #-} !(a -> b)
| hvr/jhc | regress/tests/1_typecheck/4_fail/ghc/T3966.hs | mit | 136 | 0 | 9 | 31 | 26 | 17 | 9 | 3 | 0 |
{-|
Module : Idris.Package.Common
Description : Data structures common to all `iPKG` file formats.
License : BSD3
Maintainer : The Idris Community.
-}
module Idris.Package.Common where
import Idris.Core.TT (Name)
import Idris.Imports
import Idris.Options (Opt(..))
-- | Description of an Idris package.
data ... | kojiromike/Idris-dev | src/Idris/Package/Common.hs | bsd-3-clause | 2,185 | 0 | 9 | 558 | 313 | 192 | 121 | 30 | 1 |
{-
(c) The University of Glasgow 2006
(c) The AQUA Project, Glasgow University, 1994-1998
UniqFM: Specialised finite maps, for things with @Uniques@.
Basically, the things need to be in class @Uniquable@, and we use the
@getUnique@ method to grab their @Uniques@.
(A similar thing to @UniqSet@, as opposed to @Set@.)... | acowley/ghc | compiler/utils/UniqFM.hs | bsd-3-clause | 12,598 | 0 | 14 | 3,844 | 3,612 | 1,875 | 1,737 | 202 | 3 |
module Vectorise.Utils.Hoisting
( Inline(..)
, addInlineArity
, inlineMe
, hoistBinding
, hoistExpr
, hoistVExpr
, hoistPolyVExpr
, takeHoisted
)
where
import Vectorise.Monad
import Vectorise.Env
import Vectorise.Vect
import Vectorise.Utils.Poly
import CoreSyn
import CoreUtils
import CoreUnfold
imp... | tjakway/ghcjvm | compiler/vectorise/Vectorise/Utils/Hoisting.hs | bsd-3-clause | 2,850 | 0 | 15 | 670 | 716 | 385 | 331 | 65 | 2 |
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE helpset PUBLIC "-//Sun Microsystems Inc.//DTD JavaHelp HelpSet Version 2.0//EN" "http://java.sun.com/products/javahelp/helpset_2_0.dtd">
<helpset version="2.0" xml:lang="sl-SI">
<title>WebSockets | ZAP Extension</title>
<maps>
<homeID>top</homeID>
<mapref ... | ccgreen13/zap-extensions | src/org/zaproxy/zap/extension/websocket/resources/help_sl_SI/helpset_sl_SI.hs | apache-2.0 | 972 | 80 | 66 | 159 | 413 | 209 | 204 | -1 | -1 |
{-# LANGUAGE ExtendedDefaultRules #-}
module T11974b where
default (Either, Monad, [], Maybe, Either Bool, Integer, Double, Blah)
data Blah
| ezyang/ghc | testsuite/tests/typecheck/should_fail/T11974b.hs | bsd-3-clause | 143 | 0 | 5 | 22 | 40 | 26 | 14 | -1 | -1 |
{-# LANGUAGE RankNTypes, GeneralizedNewtypeDeriving, ImpredicativeTypes #-}
module Foo where
class C a where op :: (forall b. b -> a) -> a
newtype T x = MkT x deriving( C )
| urbanslug/ghc | testsuite/tests/typecheck/should_compile/T8565.hs | bsd-3-clause | 175 | 0 | 10 | 33 | 51 | 30 | 21 | 4 | 0 |
module Parse.Basics where
import System.Environment
import System.IO
import Data.Char
import Data.Maybe
import Data.List
import Data.Either
import Control.Monad
import Text.Megaparsec
import Text.Megaparsec.Expr
import Text.Megaparsec.String
import qualified Text.Megaparsec.Lexer as L
sc :: Parser ()
sc = L.space (vo... | akindle/hdlint | Parse/Basics.hs | mit | 3,077 | 0 | 13 | 739 | 954 | 494 | 460 | 76 | 2 |
module Ch22.PodMain
where
import Ch22.PodDownload (mkManager, downloadURL, updatePodcastFromFeed, getEpisode)
import Ch21.PodDB (Podcast(..), Episode(..), addPodcast, getPodcasts, getEpisodes)
import Ch22.PodParser (Feed(..), parse')
import System.Environment (getArgs)
import Network.Socket (withSocketsDo)
import Netw... | futtetennista/IntroductionToFunctionalProgramming | RWH/src/Ch22/PodMain.hs | mit | 2,213 | 0 | 18 | 606 | 679 | 342 | 337 | 58 | 5 |
module Graphics.Urho3D.Resource.Internal.Cache(
ResourceCache
, resourceCacheCntx
) where
import qualified Language.C.Inline as C
import qualified Language.C.Inline.Context as C
import qualified Language.C.Types as C
import qualified Data.Map as Map
data ResourceCache
resourceCacheCntx :: C.Context
resourc... | Teaspot-Studio/Urho3D-Haskell | src/Graphics/Urho3D/Resource/Internal/Cache.hs | mit | 446 | 0 | 11 | 76 | 101 | 69 | 32 | -1 | -1 |
module FrozenBeagle.Genes (length', DnaString(..)) where
data DnaString a = DnaStringConstr [a] deriving (Show)
length' :: DnaString a -> Int
length' (DnaStringConstr xs) = length xs
| satai/FrozenBeagleH | src/FrozenBeagle/Genes.hs | mit | 185 | 0 | 7 | 27 | 67 | 38 | 29 | 4 | 1 |
module Dotfiles.ConfigSpec where
import System.Directory (getHomeDirectory, getTemporaryDirectory)
import System.FilePath ((</>))
import Test.Hspec
import Dotfiles
import Dotfiles.Config
import SpecHelper
spec :: Spec
spec = do
describe "Dotfiles.Config" $ do
around withEnv $ do
it "covers default env" ... | ilya-yurtaev/hdotfiles | tests/Dotfiles/ConfigSpec.hs | mit | 830 | 0 | 22 | 217 | 254 | 128 | 126 | 24 | 1 |
{-# LANGUAGE OverloadedStrings #-}
module Internal.SpockExt (serveFile, xml) where
import Control.Monad.IO.Class (MonadIO)
import qualified Data.ByteString as BS
import qualified Data.ByteString.Char8 as BS8
import qualified Data.Text as T
import qualified Data.Text.Encoding as T
imp... | mayeranalytics/nanoPage | src/Internal/SpockExt.hs | mit | 897 | 0 | 10 | 192 | 194 | 107 | 87 | 19 | 1 |
{-# LANGUAGE NoMonomorphismRestriction
#-}
module Plugins.Gallery.Gallery.Manual30 where
import Diagrams.Prelude
eff = text "F" <> square 1 # lw 0
example = eff
<> reflectAbout (p2 (0.2,0.2)) (rotateBy (-1/10) unitX) eff
| andrey013/pluginstest | Plugins/Gallery/Gallery/Manual30.hs | mit | 240 | 0 | 11 | 49 | 81 | 44 | 37 | 6 | 1 |
module EitherMonadImplementation where
data Sum a b =
First a
| Second b
deriving (Eq, Show)
instance Functor (Sum a) where
fmap _ (First e) = First e
fmap f (Second x) = Second $ f x
instance Applicative (Sum a) where
pure = Second
(First e) <*> _ = First e
_ <*> (First e) = First e
(Second ... | NickAger/LearningHaskell | HaskellProgrammingFromFirstPrinciples/Chapter18.hsproj/EitherMonadImplementation.hs | mit | 468 | 0 | 8 | 141 | 235 | 116 | 119 | 17 | 0 |
{-# LANGUAGE OverloadedStrings, ExistentialQuantification, TemplateHaskell, QuasiQuotes, ViewPatterns #-}
module Timesheet where
import Data.Time.Calendar
import qualified Data.Aeson as JSON
import qualified Data.ByteString.Lazy.Char8 as BL
import qualified Data.ByteString as BS
import Data.List
import Data.Time
impor... | emmanueltouzery/cigale-timesheet | src/WebServer/Timesheet.hs | mit | 4,879 | 0 | 16 | 882 | 1,314 | 684 | 630 | 99 | 2 |
module Data.Metric (
Metric(..),
Discrete(..),
Hamming(..),
Levenshtein(..),
RestrictedDamerauLevenshtein(..),
Euclidean(..),
Taxicab(..),
Chebyshev(..),
PostOffice(..)
) where
import Data.Metric.Class (Metric(..))
import Data.Metric.Set (Discrete(..))
import Data.Metric.String (Hamming(..), Levensht... | fmap/metric | src/Data/Metric.hs | mit | 455 | 0 | 6 | 51 | 167 | 116 | 51 | 14 | 0 |
--Find out whether a list is a palindrome.
module Main where
isPalindrome :: (Eq a) => [a] -> Bool
isPalindrome [] = True
isPalindrome xs = xs == reverse xs
main = do
if isPalindrome [1,2,3]
then putStrLn "fail"
else putStrLn "pass"
if isPalindrome [1,2,1]
then putStrLn "pass"
else putStrLn "fail"
if isP... | butchhoward/xhaskell | 99questions/p06/p06.hs | mit | 655 | 12 | 9 | 140 | 152 | 82 | 70 | 14 | 4 |
{-# LANGUAGE TypeSynonymInstances,FlexibleInstances #-}
module DiffMonoid where
import Data.Monoid
type DiffMonoid a = a -> a
abs :: Monoid a => DiffMonoid a -> a
abs a = a mempty
rep :: Monoid a => a -> DiffMonoid a
rep = mappend
instance Monoid a => Monoid (DiffMonoid a) where
mempty = rep mempty
mappend = ... | atzeus/reflectionwithoutremorse | CPS/DiffMonoid.hs | mit | 324 | 0 | 7 | 67 | 111 | 59 | 52 | 11 | 1 |
module Import
( module Import
) where
import Prelude as Import hiding (head, init, last,
readFile, tail, writeFile)
import Yesod as Import hiding (Route (..))
import Control.Applicative as Import (pure,... | smurphy8/yesod-angular-sqlite | Import.hs | mit | 1,245 | 0 | 6 | 585 | 158 | 117 | 41 | 20 | 1 |
{- main = do -}
{- a <- getLine -}
{- b <- getLine -}
{- c <- getLine -}
{- print [a,b,c] -}
main = do
rs <- sequence [getLine, getLine, getLine]
print rs
| yhoshino11/learning_haskell | ch8/sequence.hs | mit | 168 | 0 | 9 | 48 | 36 | 20 | 16 | 3 | 1 |
{-# LANGUAGE PatternSynonyms, ForeignFunctionInterface, JavaScriptFFI #-}
module GHCJS.DOM.JSFFI.Generated.RTCStatsReport
(js_stat, stat, js_names, names, js_getTimestamp, getTimestamp,
js_getId, getId, js_getType, getType, js_getLocal, getLocal,
js_getRemote, getRemote, RTCStatsReport, castToRTC... | plow-technologies/ghcjs-dom | src/GHCJS/DOM/JSFFI/Generated/RTCStatsReport.hs | mit | 3,966 | 44 | 11 | 578 | 953 | 539 | 414 | 65 | 1 |
module Handler.Quiz where
import Import
import Yesod.Form.Jquery
import Data.Aeson.Types (Result(..))
import Data.List (nub)
data FormQuiz = FormQuiz {
fqTitle :: Text,
fqTopic :: Text,
fqPublic :: Bool
}
data FormQuestion = FormQuestion {
{- Hardcoded answers is ugly, but I don't see a better way to do it w... | quantum-dan/HasKnowledge | Handler/Quiz.hs | mit | 9,786 | 0 | 29 | 2,288 | 3,020 | 1,489 | 1,531 | -1 | -1 |
import System.Environment (getArgs)
import Data.Char (isUpper)
import Control.Monad (liftM, (>=>))
import Control.Monad.Writer.Lazy (Writer, writer, tell, execWriter)
import Control.Monad.Trans.Maybe (MaybeT, runMaybeT)
type Out a = MaybeT (Writer String) a
exitWith :: String -> Out a
exitWith s = tell s >> fail ""
... | iatorm/shift | shift.hs | mit | 3,268 | 0 | 17 | 1,060 | 1,390 | 714 | 676 | 82 | 16 |
module Cmds ( cmdList ) where
import Types
import IrcBot
import Data.List
import Network
import System.Time
import System.Exit
import Data.List.Split
import Control.Concurrent.MVar
import Control.Monad.Reader
cmdList = [ IRCCommand { name="updatetopic", function=cmdUpdateTopic, description="Updates to topic to d... | DSMan195276/QB64Bot | Cmds.hs | gpl-2.0 | 4,680 | 0 | 14 | 1,179 | 1,676 | 912 | 764 | 101 | 2 |
import System.IO
import System.Random
main = do
contents <- readFile "/home/anand/workspace/my_projects/Miscellaneous/Quotes.txt"
let Quotes = split "~Aang Jie" contents
writeFile "/home/anand/.signature" rand_quote
| softwaremechanic/Miscellaneous | Haskell/I_O/rand_quote.hs | gpl-2.0 | 223 | 0 | 10 | 28 | 49 | 22 | 27 | 6 | 1 |
{- HHammer: Haskell bindings to Hammer.
Copyright 2013 Nikita Karetnikov <nikita@karetnikov.org>
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, version 2.
This program is distributed... | nkaretnikov/hhammer | Setup.hs | gpl-2.0 | 800 | 0 | 4 | 157 | 12 | 7 | 5 | 2 | 1 |
module Hdcpu16.Parser (parseins) where
import Hdcpu16.Types
import Text.Parsec
import Text.Parsec.String
import Data.Either
import qualified Text.Parsec.Token as P
import Text.Parsec.Language (emptyDef)
import Data.Map
import Data.Word
import Data.Maybe
--The Big daddy
parseins :: String -> IO [Instruction]
parseins... | igraves/hdcpu16 | Hdcpu16/Parser.hs | gpl-3.0 | 6,544 | 1 | 23 | 2,646 | 2,270 | 1,097 | 1,173 | 191 | 8 |
module Lamdu.Sugar.Convert.TIdG
( convert
) where
import Data.UUID.Types (UUID)
import qualified Lamdu.Calc.Type as T
import qualified Lamdu.Expr.UniqueId as UniqueId
import Lamdu.Sugar.Types
convert :: T.NominalId -> TIdG UUID
convert tid =
TIdG
{ _tidgName = UniqueId.toUUID tid
... | da-x/lamdu | Lamdu/Sugar/Convert/TIdG.hs | gpl-3.0 | 346 | 0 | 8 | 87 | 89 | 56 | 33 | 11 | 1 |
{-# LANGUAGE ScopedTypeVariables
#-}
module Crypto.Simple (newMasterKey, readMasterKey, encrypt, decrypt)
where
import qualified Crypto.NaCl.Encrypt.Stream as NaCl
import qualified Crypto.NaCl.Nonce as Nonce
import Data.ByteString.Char8 as B
import Data.Serialize as S
import Data.Word
import Syste... | br0ns/hindsight | src/Crypto/Simple.hs | gpl-3.0 | 1,722 | 0 | 13 | 346 | 489 | 274 | 215 | 39 | 2 |
module Main where
import System.Environment
l :: Int -> Int
l n = Prelude.sum
[ k * m
| k <- [1..n]
, m <- [1..k]
]
main :: IO ()
main = do
[arg] <- getArgs
print (l (read arg))
{-
$ time ./ComprehensionsFoldrBuild 3000 +RTS -K200M -s
10136253375250
396,388,640 bytes allocated i... | jyp/ControlledFusion | ComprehensionsFoldrBuild.hs | gpl-3.0 | 1,189 | 0 | 11 | 430 | 108 | 57 | 51 | 11 | 1 |
{-# LANGUAGE GeneralizedNewtypeDeriving #-}
-- |
-- Copyright : (c) 2012 Simon Meier
-- License : GPL v3 (see LICENSE)
--
-- Maintainer : Simon Meier <iridcode@gmail.com>
-- Portability : portable
--
-- Computate an under-approximation to the set of all facts with unique
-- instances, i.e., fact whose instances ... | ekr/tamarin-prover | lib/theory/src/Theory/Tools/InjectiveFactInstances.hs | gpl-3.0 | 2,698 | 0 | 15 | 720 | 407 | 226 | 181 | 31 | 2 |
module OSC.Message
( oscMessage
, readOSC
, sendOSC ) where
import qualified OSC.Atom as A
import qualified OSC.UDPSocket as U
import qualified Data.Maybe as M
import qualified Data.ByteString as B (ByteString)
import qualified Data.ByteString.Lazy as L
data Message = Message
{ msgAddres... | destroyhimmyrobots/osc.hs | OSC/Message.hs | gpl-3.0 | 1,773 | 26 | 14 | 468 | 801 | 412 | 389 | 48 | 1 |
{-# LANGUAGE OverloadedStrings, BangPatterns #-}
module Greg.Bot where
import Greg.Types
import Greg.IRC (send)
import qualified Data.Text as T
import qualified Data.Text.IO as T
import qualified Data.Map as M
import Data.Sequence as S ((|>), singleton)
import Control.Concurrent
import Control.M... | mikeplus64/Greg | src/Greg/Bot.hs | gpl-3.0 | 2,880 | 0 | 18 | 717 | 1,102 | 554 | 548 | 54 | 3 |
{-
Copyright (C) 2015 Leon Medvinsky
This program is free software; you can redistribute it and/or
modify it under the terms of the GNU General Public License
as published by the Free Software Foundation; either version 2
of the License, or (at your option) any later version.
This program is distributed in the hope t... | raymoo/needles | src/Needles/Bot/Trigger/Examples.hs | gpl-3.0 | 3,522 | 0 | 11 | 835 | 738 | 385 | 353 | 55 | 1 |
{-# LANGUAGE DataKinds #-}
{-# LANGUAGE DeriveDataTypeable #-}
{-# LANGUAGE DeriveGeneric #-}
{-# LANGUAGE FlexibleInstances #-}
{-# LANGUAGE NoImplicitPrelude #-}
{-# LANGUAGE OverloadedStrings #-}
{-# LANGUAGE RecordWildCards #-}
{-# LANGUAGE TypeFamilies #-}
{-# LANGUAGE TypeOperators ... | rueshyna/gogol | gogol-useraccounts/gen/Network/Google/Resource/CloudUserAccounts/Users/Get.hs | mpl-2.0 | 3,156 | 0 | 15 | 776 | 394 | 237 | 157 | 64 | 1 |
{-# LANGUAGE DataKinds #-}
{-# LANGUAGE DeriveGeneric #-}
{-# LANGUAGE FlexibleInstances #-}
{-# LANGUAGE GeneralizedNewtypeDeriving #-}
{-# LANGUAGE LambdaCase #-}
{-# LANGUAGE NoImplicitPrelude #-}
{-# LANGUAGE OverloadedStrings #-}
{-# L... | kim/amazonka | amazonka-config/gen/Network/AWS/Config/GetResourceConfigHistory.hs | mpl-2.0 | 7,627 | 0 | 12 | 1,605 | 981 | 583 | 398 | 102 | 1 |
-- | Compile with: fay examples/canvaswater.hs
{-# LANGUAGE EmptyDataDecls #-}
module TicTacToe_UI (main) where
import Prelude
import FFI
import TicTacToe_Web as Game
-- | Main entry point.
main :: Fay ()
main = do
player <- newRef (1::Int)
board <- newRef Game.newBoard
playing <- newRef True
let
... | LambdaMx/haskelldojo | session_4/tictactoe/domix_agus/web/ui.hs | unlicense | 6,928 | 0 | 27 | 2,203 | 1,581 | 785 | 796 | -1 | -1 |
module EKG.A169849 (a169849) where
import Helpers.EKGBuilder (buildEKG)
a169849 :: Int -> Integer
a169849 n = a169849_list !! (n - 1)
a169849_list :: [Integer]
a169849_list = buildEKG [9]
| peterokagey/haskellOEIS | src/EKG/A169849.hs | apache-2.0 | 190 | 0 | 7 | 29 | 68 | 39 | 29 | 6 | 1 |
-- Copyright (C) 2009-2012 John Millikin <john@john-millikin.com>
--
-- 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 require... | jmillikin/haskell-dbus | lib/DBus.hs | apache-2.0 | 8,208 | 8 | 13 | 1,449 | 1,209 | 719 | 490 | 156 | 1 |
{-# LANGUAGE CPP #-}
{-# LANGUAGE LambdaCase #-}
{-# LANGUAGE MultiWayIf #-}
{-# LANGUAGE OverloadedStrings #-}
{-# LANGUAGE ScopedTypeVariables #-}
{-# OPTIONS_GHC -fno-warn-incomplete-patterns
-fno-warn-name-shadowing
-fno-warn-unused-imports
-fno-warn-unused-matches #-}
{-
Copyright 2020 The CodeWorld... | google/codeworld | codeworld-server/src/Main.hs | apache-2.0 | 24,271 | 0 | 23 | 4,869 | 6,724 | 3,249 | 3,475 | 540 | 4 |
{-# LANGUAGE DeriveDataTypeable #-}
{-# LANGUAGE GADTs #-}
-- | Syntax tree for DNA program
module DNA.AST where
import Data.Typeable
import qualified Data.Vector.Storable as S
----------------------------------------------------------------
--
----------------------------------------------------------------
-- |... | SKA-ScienceDataProcessor/RC | MS1/distributed-dot-product/DNA/AST.hs | apache-2.0 | 698 | 0 | 10 | 121 | 153 | 87 | 66 | 13 | 0 |
{-# LANGUAGE TemplateHaskell #-}
module Process where
import Data.UUID(UUID)
import Control.Lens hiding (element)
import Control.Monad.State.Lazy(State, gets, modify)
import System.Random(StdGen, random, mkStdGen)
import Grammar
{- Process State -}
data Sim = Sim {
_stateNouns :: [Noun]
, _stateNounSuper :: [... | Lambdanaut/Dahls | app/Process.hs | apache-2.0 | 714 | 0 | 10 | 122 | 231 | 131 | 100 | 23 | 1 |
{-# LANGUAGE OverloadedStrings #-}
module Codec.GHC.Log where
import Data.Attoparsec.Text
import Data.Text (Text)
data Message = Message Text Pos Level [Text]
deriving Show
data Pos = Pos { column :: Int, line :: Int }
deriving Show
data Level = Warning | Error
deriving Show
messageParser :: Parser Message
m... | aloiscochard/sarsi | src/Codec/GHC/Log.hs | apache-2.0 | 1,220 | 0 | 16 | 312 | 443 | 233 | 210 | 32 | 1 |
{-# LANGUAGE NoImplicitPrelude, TemplateHaskell #-}
-- | Language.Lua.Annotated.Syntax is kind of an AST, but not completely.
-- This module exist to correct that deficiency.
module Language.Lua.Annotated.Syntax.HighLevel where
import BasicPrelude
import Control.Lens
import Control.Lens.TH
import Data.Text (unpack)
im... | lshift/hc2prosody | src/Language/Lua/Annotated/Syntax/HighLevel.hs | bsd-2-clause | 2,704 | 0 | 12 | 803 | 1,323 | 654 | 669 | 58 | 28 |
{-| Implementation of the LUXI loader.
-}
{-
Copyright (C) 2009, 2010, 2011, 2012, 2013 Google Inc.
All rights reserved.
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions are
met:
1. Redistributions of source code must retain the a... | ganeti/ganeti | src/Ganeti/HTools/Backend/Luxi.hs | bsd-2-clause | 13,418 | 0 | 14 | 2,824 | 3,087 | 1,602 | 1,485 | 221 | 2 |
{-# LANGUAGE MultiParamTypeClasses #-}
{-# LANGUAGE GeneralizedNewtypeDeriving #-}
{-# LANGUAGE FlexibleInstances #-}
{-# LANGUAGE RecordWildCards #-}
{-# LANGUAGE BangPatterns #-}
module Data.CRF.Chain2.Tiers.Model
(
-- * Model
Model (..)
, mkModel
, fromSet
, fromMap
, toMap
-- * Potential
, phi
, index
) where... | kawu/crf-chain2-tiers | src/Data/CRF/Chain2/Tiers/Model.hs | bsd-2-clause | 8,015 | 0 | 16 | 2,108 | 2,647 | 1,435 | 1,212 | 189 | 2 |
{-# Language TypeFamilies #-}
module Data.Source.ByteString.Char8.Offset where
import Data.Char
import Data.Source.Class
import qualified Data.ByteString as B
data Src
= Src
{ loc :: Int
, str :: B.ByteString
} deriving (Eq,Ord,Show,Read)
instance Source Src where
type Location Src = Int
type Element Src = C... | permeakra/source | Data/Source/ByteString/Char8/Offset.hs | bsd-3-clause | 907 | 0 | 14 | 296 | 367 | 195 | 172 | 31 | 1 |
{-# LANGUAGE CPP #-}
#if __GLASGOW_HASKELL__ >= 701
{-# LANGUAGE Trustworthy #-}
#endif
-----------------------------------------------------------------------------
-- |
-- Module : Data.Binary
-- Copyright : Lennart Kolmodin
-- License : BSD3-style (see LICENSE)
--
-- Maintainer : Lennart Kolmodin <kolmod... | ezyang/binary | src/Data/Binary.hs | bsd-3-clause | 8,573 | 0 | 16 | 2,088 | 832 | 530 | 302 | 54 | 4 |
{-# language CPP #-}
-- No documentation found for Chapter "Core11"
module Vulkan.Core11 ( pattern API_VERSION_1_1
, module Vulkan.Core11.DeviceInitialization
, module Vulkan.Core11.Enums
, module Vulkan.Core11.Handles
, module Vul... | expipiplus1/vulkan | src/Vulkan/Core11.hs | bsd-3-clause | 4,153 | 0 | 6 | 789 | 410 | 277 | 133 | -1 | -1 |
module Haskell.Types where
import Control.Lens
import qualified Text.PrettyPrint.Leijen.Text as PP
import Data.IndexedSet (IndexKey(..), SplitKey(..))
import Core.Types
import Core.Pretty
type HsType meta = NType meta
type HsTyCon meta = NTyCon meta
type HsTyDecl meta = NTyDecl meta
data HsPat' meta = HPVar Name
... | abbradar/dnohs | src/Haskell/Types.hs | bsd-3-clause | 3,076 | 0 | 12 | 858 | 1,339 | 691 | 648 | -1 | -1 |
module Cabal2Nix.Flags ( configureCabalFlags ) where
import Distribution.Package
import Distribution.PackageDescription
configureCabalFlags :: PackageIdentifier -> FlagAssignment
configureCabalFlags (PackageIdentifier (PackageName name) _)
| name == "accelerate-examples"= [disable "opencl"]
| name == "arithmoi" ... | spencerjanssen/cabal2nix | src/Cabal2Nix/Flags.hs | bsd-3-clause | 1,642 | 0 | 9 | 402 | 539 | 266 | 273 | 29 | 1 |
{-# LANGUAGE GADTs #-}
{-# LANGUAGE TypeFamilies #-}
{-# LANGUAGE DataKinds #-}
{-# LANGUAGE KindSignatures #-}
{-# LANGUAGE TypeOperators #-}
{-# LANGUAGE FlexibleInstances #-}
{-# LANGUAGE EmptyCase #-}
module Language.BCoPL.TypeLevel.MetaTheory.Nat where
import Language.BCoPL.TypeLevel.Peano
import Language.BCoPL.T... | nobsun/hs-bcopl | src/Language/BCoPL/TypeLevel/MetaTheory/Nat.hs | bsd-3-clause | 11,644 | 0 | 31 | 3,374 | 4,998 | 2,500 | 2,498 | -1 | -1 |
{-# LANGUAGE FlexibleContexts #-}
{-# LANGUAGE ScopedTypeVariables #-}
module Data.FAlgebra.Tree.Splay
( module Data.FAlgebra.Annotation
, module Data.FAlgebra.Base
, module Data.FAlgebra.Tree
, module Data.FAlgebra.Tree.Indexed
, module Data.FAlgebra.Tree.Zipper
, getIndex
, setIndex
,... | bhamrick/fixalgs | Data/FAlgebra/Tree/Splay.hs | bsd-3-clause | 3,449 | 0 | 20 | 950 | 1,322 | 695 | 627 | 71 | 7 |
main = return $ 1 + 2
-- putStrLn "Hello, world!"
a1 x = let y = 1
in x + y | benjijones/red | test/test_main.hs | bsd-3-clause | 86 | 0 | 8 | 32 | 38 | 19 | 19 | 3 | 1 |
{-# LANGUAGE FlexibleInstances, TypeSynonymInstances #-}
-- The Timber compiler <timber-lang.org>
--
-- Copyright 2008-2009 Johan Nordlander <nordland@csee.ltu.se>
-- All rights reserved.
--
-- Redistribution and use in source and binary forms, with or without
-- modification, are permitted provided that the followi... | mattias-lundell/timber-llvm | src/PP.hs | bsd-3-clause | 2,994 | 0 | 11 | 671 | 603 | 325 | 278 | 37 | 1 |
-- -----------------------------------------------------------------------------
--
-- ParseMonad.hs, part of Alex
--
-- (c) Simon Marlow 2003
--
-- ----------------------------------------------------------------------------}
module ParseMonad (
AlexInput, alexInputPrevChar, alexGetChar, alexGetByte,
... | simonmar/alex | src/ParseMonad.hs | bsd-3-clause | 6,194 | 0 | 13 | 1,523 | 1,897 | 1,070 | 827 | 122 | 2 |
{-# LANGUAGE DeriveDataTypeable,
RecordWildCards #-}
module Graphics.ThumbnailPlus
( createThumbnails
, Configuration(..)
, Size(..)
, ReencodeOriginal(..)
, FileFormat(..)
, CreatedThumbnails(..)
, Thumbnail(..)
, NoShow(..)
) where
import Control.Arrow ((***))
import Control.Monad (unl... | prowdsponsor/thumbnail-plus | src/Graphics/ThumbnailPlus.hs | bsd-3-clause | 9,183 | 0 | 23 | 2,254 | 2,074 | 1,141 | 933 | 195 | 6 |
import qualified Data.List as List
import Data.Function (on)
import Data.Char as Char
import qualified Data.Map as Map
import qualified Data.Set as Set
import qualified Geometry.Sphere as Sphere
import qualified Geometry.Cuboid as Cuboid
import qualified Geometry.Cube as Cube
intersperseMonkey = List.intersperse ... | randallalexander/LYAH | src/Ch7.hs | bsd-3-clause | 1,537 | 0 | 10 | 270 | 596 | 349 | 247 | 34 | 1 |
module Options.Verbosity where
import Types
verbosityOptions :: [Flag]
verbosityOptions =
[ flag { flagName = "-v"
, flagDescription = "verbose mode (equivalent to ``-v3``)"
, flagType = DynamicFlag
}
, flag { flagName = "-v⟨n⟩"
, flagDescription = "set verbosity level"
... | gridaphobe/ghc | utils/mkUserGuidePart/Options/Verbosity.hs | bsd-3-clause | 2,350 | 0 | 8 | 728 | 306 | 198 | 108 | 51 | 1 |
{-# LANGUAGE FlexibleContexts #-}
{-# LANGUAGE NamedFieldPuns #-}
{-# LANGUAGE OverlappingInstances #-}
{-# LANGUAGE QuasiQuotes #-}
{-# LANGUAGE RankNTypes #-}
{-# LANGUAGE RecordWildCards #-}
{-# LANGUAGE TemplateHaskell #-}
{-# LANGUAGE DeriveGeneric #-}
module Forml.Ty... | texodus/forml | src/hs/lib/Forml/Types/TypeDefinition.hs | bsd-3-clause | 1,216 | 0 | 14 | 380 | 253 | 140 | 113 | 27 | 0 |
{-# LANGUAGE OverloadedStrings, ScopedTypeVariables, TypeFamilies, TypeSynonymInstances, FlexibleInstances #-}
module Web.Scotty.CRUD.Types (
CRUD(..),
Id, Table, Row, Named(..),
namedRowToRow, rowToNamedRow, lookupColumn
) where
import Control.Applicative
import Data.A... | ku-fpg/scotty-crud | src/Web/Scotty/CRUD/Types.hs | bsd-3-clause | 2,514 | 0 | 14 | 608 | 557 | 301 | 256 | 40 | 2 |
module Sloch.Dirent
( SlochDirent(..)
, slochDirent
, slochDirents
) where
import Data.Maybe (catMaybes)
import Language
import Dirent
import LineCounter
data SlochDirent = SlochDirentFile FilePath Language Int
| SlochDirentDir FilePath [SlochDirent]
deriving Show
... | mitchellwrosen/Sloch | src/sloch/Sloch/Dirent.hs | bsd-3-clause | 1,050 | 0 | 11 | 222 | 226 | 120 | 106 | 20 | 2 |
{-# LANGUAGE DataKinds,UnboxedTuples,MagicHash,TemplateHaskell,RankNTypes,TupleSections #-}
module HLearn.Data.SpaceTree.Algorithms.NearestNeighbor
(
-- * data types
Neighbor (..)
, ValidNeighbor (..)
, NeighborList (..)
, nlSingleton
, getknnL
, nlMaxDist
, Param_k
, _k
... | iamkingmaker/HLearn | src/HLearn/Data/SpaceTree/Algorithms/NearestNeighbor.hs | bsd-3-clause | 13,397 | 0 | 17 | 3,820 | 3,487 | 1,806 | 1,681 | -1 | -1 |
{-|
Module : Data.Boltzmann.Internal.Utils
Description : General utilities for boltzmann-brain.
Copyright : (c) Maciej Bendkowski, 2017-2021
License : BSD3
Maintainer : maciej.bendkowski@tcs.uj.edu.pl
Stability : experimental
General utilities for boltzmann-brain.
-}
module Data.Boltzmann.Intern... | maciej-bendkowski/boltzmann-brain | Data/Boltzmann/Internal/Utils.hs | bsd-3-clause | 3,129 | 0 | 11 | 739 | 829 | 443 | 386 | 67 | 2 |
{-|
Module : Idris.Docs
Description : Data structures and utilities to work with Idris Documentation.
Copyright :
License : BSD3
Maintainer : The Idris Community.
-}
{-# LANGUAGE DeriveFunctor, PatternGuards, MultiWayIf #-}
{-# OPTIONS_GHC -fwarn-incomplete-patterns #-}
module Idris.Docs (
pprintDocs
... | enolan/Idris-dev | src/Idris/Docs.hs | bsd-3-clause | 17,843 | 0 | 25 | 6,174 | 5,482 | 2,778 | 2,704 | 323 | 24 |
{-# LANGUAGE FlexibleContexts #-}
{-# LANGUAGE MultiParamTypeClasses #-}
{-# LANGUAGE OverloadedStrings #-}
{-# LANGUAGE QuasiQuotes #-}
{-# LANGUAGE RankNTypes #-}
{-# LANGUAGE TemplateHaskell #-}
{-# LANGUAGE TypeFamilies #-}
{-|
Module : Yesod.Auth.Hardcoded
Descript... | erikd/yesod | yesod-auth/Yesod/Auth/Hardcoded.hs | mit | 6,084 | 0 | 14 | 1,554 | 454 | 254 | 200 | 46 | 3 |
module Uroboro.InterpreterSpec
(
spec
) where
import Test.Hspec
import Text.Parsec (parse)
import Paths_uroboro (getDataFileName)
import Uroboro.Checker (typecheck, inferExp)
import Uroboro.CheckerSpec (prelude)
import Uroboro.Interpreter (pmatch, eval)
import Uroboro.Parser (parseDef, parseExp)
import ... | tewe/uroboro | test/Uroboro/InterpreterSpec.hs | mit | 2,266 | 0 | 18 | 725 | 677 | 317 | 360 | 63 | 3 |
{-# LANGUAGE DeriveGeneric #-}
{-# LANGUAGE FlexibleInstances #-}
{-# LANGUAGE GeneralizedNewtypeDeriving #-}
{-# LANGUAGE TypeFamilies #-}
{-# LANGUAGE TypeSynonymInstances #-}
module HERMIT.PrettyPrinter.Glyphs where
import Data.Semigroup (Semigroup(..))
import Data.Typeable
import HERMIT.Kure
import HERMIT.Externa... | conal/hermit | src/HERMIT/PrettyPrinter/Glyphs.hs | bsd-2-clause | 3,508 | 0 | 12 | 901 | 1,142 | 591 | 551 | 82 | 4 |
{-| Executing jobs as processes
The protocol works as follows (MP = master process, FP = forked process):
* MP sets its own livelock as the livelock of the job to be executed.
* FP creates its own lock file and sends its name to the MP.
* MP updates the lock file name in the job file and confirms the FP it can
st... | ganeti/ganeti | src/Ganeti/Query/Exec.hs | bsd-2-clause | 7,850 | 0 | 23 | 1,919 | 1,466 | 754 | 712 | 120 | 5 |
{-# OPTIONS -fglasgow-exts #-}
-----------------------------------------------------------------------------
{-| Module : Csg.hs
Copyright : (c) David Harley 2010
Project : qtHaskell
Version : 1.1.4
Modified : 2010-09-02 17:02:42
Warning : this file is machine generated - do not modif... | uduki/hsQt | extra-pkgs/Glome/Qt/Glome/Csg.hs | bsd-2-clause | 5,564 | 0 | 24 | 1,816 | 1,573 | 798 | 775 | 125 | 12 |
-- -----------------------------------------------------------------------------
--
-- Output.hs, part of Alex
--
-- (c) Simon Marlow 2003
--
-- Code-outputing and table-generation routines
--
-- ----------------------------------------------------------------------------}
module Output (outputDFA) where
import AbsS... | beni55/alex | src/Output.hs | bsd-3-clause | 10,844 | 192 | 15 | 2,561 | 2,095 | 1,353 | 742 | -1 | -1 |
{-# LANGUAGE ParallelArrays #-}
{-# OPTIONS -fvectorise #-}
module Vectorised (test) where
import Data.Array.Parallel hiding (Bool, True, False, not, fromBool, toBool)
import Data.Array.Parallel.Prelude hiding (Bool, True, False, not, fromBool, toBool)
import Data.Array.Parallel.Prelude.Int as I
imp... | mainland/dph | dph-examples/examples/smoke/data/Bool/Vectorised.hs | bsd-3-clause | 742 | 0 | 9 | 179 | 244 | 139 | 105 | 22 | 1 |
{-# LANGUAGE CPP, TupleSections #-}
-- |Vectorisation of expressions.
module Vectorise.Exp
( -- * Vectorise right-hand sides of toplevel bindings
vectTopExpr
, vectTopExprs
, vectScalarFun
, vectScalarDFun
)
where
#include "HsVersions.h"
import Vectorise.Type.Type
import Vectorise.Var
import Vectori... | vTurbine/ghc | compiler/vectorise/Vectorise/Exp.hs | bsd-3-clause | 49,617 | 6 | 22 | 14,195 | 11,335 | 5,938 | 5,397 | -1 | -1 |
-----------------------------------------------------------------------------
-- |
-- Module : Database.PostgreSQL.Simple.LargeObjects
-- Copyright : (c) 2011-2012 Leon P Smith
-- License : BSD3
--
-- Maintainer : leon@melding-monads.com
--
-- Support for PostgreSQL's Large Objects; see
-- <https://www... | tomjaguarpaw/postgresql-simple | src/Database/PostgreSQL/Simple/LargeObjects.hs | bsd-3-clause | 3,546 | 0 | 17 | 744 | 1,005 | 538 | 467 | 59 | 2 |
{-# LANGUAGE FlexibleInstances #-}
module Control.Effect.Identity where
import Control.Effect
import qualified Data.Functor.Identity as Id
import qualified Control.Monad.Trans.Identity as Id
runIdentity
:: Monad m
=> Eff Id.Identity m a -> m a
runIdentity = Id.runIdentityT . translate (return . Id.runIdentity)
{... | ocharles/interpreters | Control/Effect/Identity.hs | bsd-3-clause | 346 | 0 | 9 | 50 | 84 | 50 | 34 | 10 | 1 |
{-# LANGUAGE ScopedTypeVariables #-}
module Main (main) where
import Robots.Nice
import Robots.Generator
import Robots.Solver
import Robots.QSearch
import Robots.Config hiding ( breit )
import Robots.Data
import Robots.Move
import Autolib.ToDoc
import Autolib.Schichten
import Autolib.Util.Zufall ( eins, repeat_until... | florianpilz/autotool | src/Robots/Generator_Main.hs | gpl-2.0 | 5,664 | 74 | 24 | 1,810 | 2,318 | 1,213 | 1,105 | -1 | -1 |
module Usage.Usage where
import qualified Definition.Definition as Definition
import qualified Other.Definition as Definition
test :: Int
test = D<caret>efinition.seven + 1
testBis :: Int
testBis = Definition.eight + 8
| charleso/intellij-haskforce | tests/gold/codeInsight/QualifiedImport_MultipleImportSameQualifiedName1/Usage/Usage.hs | apache-2.0 | 225 | 0 | 7 | 35 | 62 | 38 | 24 | -1 | -1 |
fun x y z = f x x y z | mpickering/hlint-refactor | tests/examples/Lambda5.hs | bsd-3-clause | 21 | 1 | 5 | 9 | 27 | 10 | 17 | 1 | 1 |
{-# LANGUAGE EmptyCase #-}
{-# LANGUAGE GADTs #-}
{-# LANGUAGE TemplateHaskell #-}
{-# LANGUAGE TypeOperators #-}
{-# OPTIONS_GHC -Wall #-}
module T17270 where
import Data.Type.Equality
f :: a :~: Int -> b :~: Bool -> a :~: b -> void
f Refl Refl x = case x of {}
$([d| g :: a :~: Int -> b :~: Bool -> a :~: b -> void
... | sdiehl/ghc | testsuite/tests/th/T17270.hs | bsd-3-clause | 363 | 0 | 8 | 88 | 73 | 44 | 29 | 11 | 0 |
{-# LANGUAGE MultiParamTypeClasses #-}
{-# LANGUAGE FunctionalDependencies #-}
{-# LANGUAGE FlexibleInstances #-}
module HigherOrderParse where
import Data.Tree
-- |Adapter class for various error types such as BNFCs ErrM etc.
-- b is the given polymorphic errortype (e.g. ErrM Program) whose
-- parameter is a, thus ... | RefactoringTools/HaRe | hareview/data/HigherOrderParse.hs | bsd-3-clause | 1,125 | 0 | 10 | 289 | 271 | 142 | 129 | 22 | 2 |
{-# LANGUAGE ScopedTypeVariables #-}
module List () where
{-@ Decrease go 3 4 5 @-}
{-@ Decrease perms 4 5 6 @-}
{-@ foo :: xs:[a] -> ys:[a] -> {v:Int| v = (len xs)- (len ys)} -> Int @-}
foo :: [a] -> [a] -> Int -> Int
foo = undefined
permutations :: [a] -> [[a]]
permutations xs = go xs xs (length xs) ... | mightymoose/liquidhaskell | tests/pos/malformed0.hs | bsd-3-clause | 947 | 0 | 12 | 274 | 275 | 151 | 124 | 9 | 2 |
module ListDemo where
data Poo a = C { t :: Poo a }
{-@ type Geq N = {v:_ | N <= v} @-}
{-@ data Poo a = C { t :: Poo (Geq 0) } @-}
| mightymoose/liquidhaskell | tests/crash/hole-crash1.hs | bsd-3-clause | 135 | 0 | 9 | 42 | 25 | 16 | 9 | 2 | 0 |
module Distribution.Server.Users.Group (
module UserIdSet,
UserGroup(..),
GroupDescription(..),
nullDescription,
groupName,
queryUserGroups,
) where
import Distribution.Server.Users.Types
import Distribution.Server.Users.UserIdSet as UserIdSet
import Distribution.Server.Framework.MemSize
imp... | ocharles/hackage-server | Distribution/Server/Users/Group.hs | bsd-3-clause | 3,048 | 0 | 11 | 626 | 406 | 248 | 158 | 37 | 1 |
{-# LANGUAGE RankNTypes #-}
-- This one showed up a bug in pre-subsumption
module ShouldCompile where
class Data a where {}
type GenericQ r = forall a. Data a => a -> r
everything :: (r -> r -> r) -> GenericQ r
everything k f = error "urk"
-- | Get a list of all entities that meet a predicate
listify :: (r -> ... | spacekitteh/smcghc | testsuite/tests/typecheck/should_compile/tc206.hs | bsd-3-clause | 371 | 0 | 8 | 84 | 112 | 62 | 50 | -1 | -1 |
-- Set up the data structures provided by 'Vectorise.Builtins'.
module Vectorise.Builtins.Initialise (
-- * Initialisation
initBuiltins, initBuiltinVars
) where
import Vectorise.Builtins.Base
import BasicTypes
import TysPrim
import DsMonad
import TysWiredIn
import DataCon
import TyCon
import Class
import CoreSyn... | urbanslug/ghc | compiler/vectorise/Vectorise/Builtins/Initialise.hs | bsd-3-clause | 10,353 | 1 | 17 | 3,316 | 2,278 | 1,208 | 1,070 | 163 | 2 |
module ShouldCompile where
import Data.List (nub) -- all unused
import Data.Char (ord, chr) -- some unused
x = chr 42
| urbanslug/ghc | testsuite/tests/rename/should_compile/rn046.hs | bsd-3-clause | 121 | 0 | 5 | 23 | 37 | 23 | 14 | 4 | 1 |
{-# LANGUAGE OverloadedStrings #-}
module Yesod.Auth.Message
( AuthMessage (..)
, defaultMessage
-- * All languages
, englishMessage
, portugueseMessage
, swedishMessage
, germanMessage
, frenchMessage
, norwegianBokmålMessage
, japaneseMessage
, finnishMessage
, chine... | yesodweb/yesod | yesod-auth/Yesod/Auth/Message.hs | mit | 51,070 | 3 | 8 | 5,757 | 6,642 | 3,427 | 3,215 | 836 | 1 |
module Y2018.M02.D02.Solution where
{--
We have been able to download sets of articles and then we've triaged them,
but before we do triage, we have to do a bifurcation from before: we don't
want Associated Press articles showing up in our NEW / UPDATED / REDUNDANT
stacks.
Today's Haskell problem is to remove the AP ... | geophf/1HaskellADay | exercises/HAD/Y2018/M02/D02/Solution.hs | mit | 2,737 | 0 | 14 | 499 | 564 | 314 | 250 | 38 | 1 |
{-# OPTIONS_JHC -fno-prelude -fffi #-}
module Jhc.Storable(Storable_(..)) where
import Jhc.Basics
import Jhc.Addr
import Jhc.IO
class Storable_ a where
sizeOf_ :: a -> Word__
alignment_ :: a -> Word__
peekElemOff_ :: Addr__ -> Word__ -> IO a
pokeElemOff_ :: Addr__ -> Word__ -> a -> UIO_
peek_ :: A... | m-alvarez/jhc | lib/jhc/Jhc/Storable.hs | mit | 752 | 0 | 20 | 180 | 296 | 161 | 135 | -1 | -1 |
-- Parenthesization
---- (2^) $ (+2) $ 3*2
---- (2^) $ 2 + 2 $ (*30)
---- (2^) $ 2 + 2 $ (*30)
---- 2 + 2 $ (*30)
---- (2 + 2) (*30)
---- 4 (* 30)
---- (2^) $ (*30) $ 2 + 2
---- (2^) $ (*30) $ 2 + 2
---- (2^) $ (*30) 4
---- (2^) $ 120
---- (2^) 120
---- 1329227995784915872903807060280344576
... | diminishedprime/.org | reading-list/haskell_programming_from_first_principles/02_13.hs | mit | 720 | 0 | 2 | 245 | 37 | 36 | 1 | 1 | 0 |
import Network.Socket
import System.IO
import Control.Concurrent
import Network.Connection
import qualified Data.ByteString.Char8 as BSC
import Aws
import Aws.Core
import Aws.General
import Aws.Sns
import Data.IORef
import Data.Time.Clock
import qualified Data.Text as DT
main :: IO ()
main = do
-- create socket
... | dgonyeo/irc-locator | Locator.hs | mit | 2,433 | 1 | 14 | 629 | 760 | 362 | 398 | 63 | 1 |
-- PutJSON.hs
module PutJSON where
import Data.List (intercalate)
import SimpleJSON
renderJValue :: JValue -> String
renderJValue (JString s) = show s
renderJValue (JNumber n) = show s
renderJValue (JBool True) = "true"
renderJValue (JBool False) = "false"
renderJValue (JNull) = "null"
renderJValue (JOb... | sammyd/Learning-Haskell | ch05/PutJSON.hs | mit | 696 | 0 | 9 | 163 | 272 | 137 | 135 | 18 | 3 |
type Vector = (Double, Double)
data Shape = Circle Vector Double
| Poly [Vector]
| akampjes/learning-realworldhaskell | ch03/ShapeUnion.hs | mit | 97 | 0 | 7 | 30 | 32 | 19 | 13 | -1 | -1 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.