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 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|
{-# LANGUAGE DoAndIfThenElse #-}
{- |
Copyright : Galois, Inc. 2012-2015
License : BSD3
Maintainer : jhendrix@galois.com
Stability : experimental
Portability : non-portable (language extensions)
-}
module Main where
import Test.Tasty
import Test.Tasty.Options
import Test.Tasty.Ingredients
import Test.Tasty.... | iblumenfeld/saw-core | tests/src/Tests.hs | bsd-3-clause | 1,000 | 0 | 11 | 172 | 163 | 95 | 68 | 26 | 1 |
{-# LANGUAGE FlexibleContexts #-}
{-# LANGUAGE FlexibleInstances #-}
{-# LANGUAGE GADTs #-}
{-# LANGUAGE MonadComprehensions #-}
{-# LANGUAGE MultiParamTypeClasses #-}
{-# LANGUAGE OverloadedStrings #-}
{-# LANGUAGE RebindableSyntax #-}
{-# LANGUAGE TemplateHaskell #-}
{-# LANG... | ulricha/dsh-aquery | Queries/AQuery/Trades.hs | bsd-3-clause | 2,132 | 0 | 12 | 560 | 650 | 348 | 302 | 43 | 1 |
{-|
This module provides a data structure for directed graphs
with weighted edges.
-}
module WeightedGraph
(
WeightedGraph(..),
LabelledGraph(..),
weight
) where
import Prelude hiding (foldr, lookup)
import Data.Map hiding (foldr)
import Data.Foldable
import GraphUtils
-- ... | alexisVallet/ag44-graph-algorithms | WeightedGraph.hs | bsd-3-clause | 815 | 0 | 10 | 184 | 228 | 129 | 99 | 22 | 1 |
-- !!! Testing top level printer (note that this doesn't necessarily test show)
-- Test things of type String
test1, test2, test3 :: String
test1 = "abcd"
test2 = ""
test3 = "abcd\0efgh\0"
test4 = "abc" ++ error "def" ++ "hij"
test5 = "abc" ++ [error "def"] ++ "hij"
test6 = 'a' : 'b' : 'c' : error "foo"
test7 = 'a' ... | FranklinChen/Hugs | tests/rts/print.hs | bsd-3-clause | 2,056 | 0 | 8 | 436 | 527 | 314 | 213 | 52 | 1 |
module Tests.Common
( assertFa
, assert2Fa
) where
import Test.Hspec
import Types.Fa (Fa, State, Symbol)
import Parsing.General (loadFa)
assertFa :: FilePath -> (Fa Symbol State -> Bool) -> Expectation
assertFa filePath condition =
loadFa ("tests/Examples/" ++ filePath) >>= \fa ->
case fa of
Left p... | jakubriha/automata | tests/Tests/Common.hs | bsd-3-clause | 916 | 0 | 14 | 212 | 276 | 140 | 136 | 22 | 3 |
{-# LANGUAGE ForeignFunctionInterface #-}
-- | Provides a thin wrapper for the FFI bindings to libexpect contained in
-- System.Expect.ExpectBindings.
module System.Expect.ExpectInterface
({-- The contents of the binding that are to be further exposed --}
ExpectType(ExpExact,ExpRegex,ExpGlob,ExpNull)
{-- The c... | stroan/haskell-libexpect | System/Expect/ExpectInterface.hs | bsd-3-clause | 5,353 | 4 | 11 | 1,402 | 974 | 534 | 440 | 99 | 2 |
-- |
-- Module : $Header$
-- Copyright : (c) 2013-2015 Galois, Inc.
-- License : BSD3
-- Maintainer : cryptol@galois.com
-- Stability : provisional
-- Portability : portable
{-# LANGUAGE OverloadedStrings #-}
{-# LANGUAGE PatternGuards #-}
module Cryptol.Parser.LexerUtils where
import Cryptol.Pars... | ntc2/cryptol | src/Cryptol/Parser/LexerUtils.hs | bsd-3-clause | 17,054 | 0 | 19 | 6,800 | 4,649 | 2,506 | 2,143 | 359 | 24 |
module XWiiMote where
import XWiiMote.FFI
| sw17ch/hsxwiimote | XWiiMote.hs | bsd-3-clause | 43 | 0 | 4 | 6 | 9 | 6 | 3 | 2 | 0 |
{-# LANGUAGE RecordWildCards,ViewPatterns #-}
{-# OPTIONS_GHC -fno-warn-name-shadowing #-}
module Math.Statistics.WCC_NEW(wcc,WCCParams(..)) where
import Math.Statistics(pearson)
import Math.Statistics.WCC.Types
import DebugUtils(dimension)
--import Data.List(genericLength)
--pearson x = (+(-1)) . (*2) . (o/genericLen... | runebak/wcc | Source/Math/Statistics/WCC_NEW.hs | bsd-3-clause | 2,296 | 1 | 15 | 643 | 851 | 452 | 399 | 40 | 3 |
{-# LANGUAGE UndecidableInstances #-}
{-# LANGUAGE StandaloneDeriving #-}
{-# OPTIONS_GHC -fno-warn-unused-imports #-}
{-# LANGUAGE FlexibleContexts #-}
{-# LANGUAGE MultiParamTypeClasses #-}
{-# LANGUAGE ScopedTypeVariables #-}
{-# LANGUAGE TypeFamilies #-}
module Finance.Exchange.Simulation
( Si... | schernichkin/exchange | src/Finance/Exchange/Simulation.hs | bsd-3-clause | 5,251 | 0 | 14 | 1,135 | 473 | 275 | 198 | 36 | 2 |
{-# LANGUAGE PolyKinds #-}
{-# LANGUAGE DataKinds #-}
module Esquilo.Types.Keywords where
import GHC.TypeLits
-- http://www.postgresql.org/docs/9.0/static/sql-select.html
-- [ WITH [ RECURSIVE ] with_query [, ...] ]
-- SELECT [ ALL | DISTINCT [ ON ( expression [, ...] ) ] ]
-- * | expression [ [ AS ] output_name ]... | jkarni/esquilo | src/Esquilo/Types/Keywords.hs | bsd-3-clause | 970 | 0 | 5 | 249 | 58 | 46 | 12 | -1 | -1 |
{-# LANGUAGE OverloadedStrings #-}
module Main ( main ) where
import Control.Concurrent
import Control.Lens hiding ((*~))
import Control.Monad
import ETCS.DMI
import ETCS.DMI.StartupSequence
import ETCS.DMI.Types
import ETCS... | open-etcs/openetcs-dmi | app/main.hs | bsd-3-clause | 2,749 | 0 | 15 | 846 | 589 | 325 | 264 | 59 | 1 |
module Pos.Core.Common.CoinPortion
( CoinPortion (..)
, coinPortionDenominator
, checkCoinPortion
, unsafeCoinPortionFromDouble
, coinPortionToDouble
, applyCoinPortionDown
, applyCoinPortionUp
) where
import Universum
import Control.Monad.Ex... | input-output-hk/pos-haskell-prototype | core/src/Pos/Core/Common/CoinPortion.hs | mit | 4,390 | 0 | 12 | 964 | 909 | 503 | 406 | -1 | -1 |
{-# LANGUAGE OverloadedStrings #-}
{-# LANGUAGE RankNTypes #-}
{-# LANGUAGE RecordWildCards #-}
{-# LANGUAGE DeriveDataTypeable #-}
-- | HTTP over SSL/TLS support for Warp via the TLS package.
module Network.Wai.Handler.WarpTLS (
-- * Settings
TLSSettings
, certFile
, keyFile
, onInsecure
, ... | beni55/wai | warp-tls/Network/Wai/Handler/WarpTLS.hs | mit | 9,080 | 3 | 42 | 3,717 | 1,687 | 909 | 778 | -1 | -1 |
-- | A simple Cofeescript library.
module Coffee.Bindings
( Coffee(..)
, coffeeCompile
, coffeeVersion
, coffeePrint
) where
import Data.Maybe (fromMaybe)
import System.Process (rawSystem, readProcess)
import System.Exit (ExitCode(..))
-- | The Coffee data structure
data Coffee = C... | AtticHacker/haskell-coffee | src/Coffee/Bindings.hs | gpl-3.0 | 1,521 | 0 | 9 | 370 | 364 | 200 | 164 | 31 | 1 |
#! /usr/bin/env nix-shell
#! nix-shell datahub-producer.hs.nix -i runghc
{-# LANGUAGE OverloadedStrings, FlexibleInstances, FlexibleContexts, ScopedTypeVariables #-}
{-# LANGUAGE TemplateHaskell #-}
import System.Environment (getArgs)
import System.Directory (canonicalizePath)
import Data.Typeable (Typeable)
import D... | mars-lan/WhereHows | contrib/metadata-ingestion/haskell/bin/datahub-producer.hs | apache-2.0 | 7,175 | 1 | 22 | 1,565 | 2,069 | 1,106 | 963 | -1 | -1 |
{-|
Module : IRTS.CodegenC
Description : The default code generator for Idris, generating C code.
Copyright :
License : BSD3
Maintainer : The Idris Community.
-}
{-# LANGUAGE FlexibleContexts #-}
module IRTS.CodegenC (codegenC) where
import Idris.AbsSyntax hiding (getBC)
import Idris.Core.TT
import IRTS.B... | Heather/Idris-dev | src/IRTS/CodegenC.hs | bsd-3-clause | 45,557 | 0 | 33 | 14,483 | 20,039 | 9,886 | 10,153 | 883 | 31 |
{-# LANGUAGE CPP #-}
#include "fusion-phases.h"
-- | Closures.
-- Used when closure converting the source program during vectorisation.
module Data.Array.Parallel.Lifted.Closure
( -- * Closures.
(:->)(..)
, ($:)
-- * Array Closures.
, PData(..)
, ($:^), liftedApply... | mainland/dph | dph-lifted-vseg/Data/Array/Parallel/Lifted/Closure.hs | bsd-3-clause | 22,151 | 6 | 19 | 7,072 | 7,113 | 3,711 | 3,402 | -1 | -1 |
{-# LANGUAGE ExistentialQuantification, TypeFamilies, ParallelListComp, ScopedTypeVariables
#-}
-- | This module contains convenience functions for building deep embedding entities.
module Language.KansasLava.Entity where
import Language.KansasLava.Rep
import Language.KansasLava.Types
-- | A zero-input Entity.
entit... | andygill/kansas-lava | Language/KansasLava/Entity.hs | bsd-3-clause | 2,093 | 40 | 13 | 565 | 995 | 543 | 452 | 44 | 1 |
module Reddit.Routes
( module Routes ) where
import Reddit.Routes.Captcha as Routes
import Reddit.Routes.Comment as Routes
import Reddit.Routes.Flair as Routes
import Reddit.Routes.Message as Routes
import Reddit.Routes.Post as Routes
import Reddit.Routes.Subreddit as Routes
import Reddit.Routes.Thing as Routes
impo... | intolerable/reddit | src/Reddit/Routes.hs | bsd-2-clause | 424 | 0 | 4 | 50 | 92 | 68 | 24 | 12 | 0 |
{-# LANGUAGE PatternGuards #-}
module Main where
import System.IO
import GHC
import MonadUtils
import Outputable
import Bag (filterBag,isEmptyBag)
import System.Directory (removeFile)
import System.Environment( getArgs )
main::IO()
main = do
let c="module Test where\ndata DataT=MkData {name :: String}\n"
... | lukexi/ghc-7.8-arm64 | testsuite/tests/ghc-api/T6145.hs | bsd-3-clause | 1,649 | 0 | 16 | 644 | 456 | 223 | 233 | 39 | 3 |
{-# LANGUAGE DeriveDataTypeable #-}
-- | A module to deal with verbosity, how \'chatty\' a program should be.
-- This module defines the 'Verbosity' data type, along with functions
-- for manipulating a global verbosity value.
module System.Console.CmdArgs.Verbosity(
Verbosity(..), setVerbosity, getVerbosit... | copland/cmdargs | System/Console/CmdArgs/Verbosity.hs | bsd-3-clause | 1,863 | 0 | 7 | 367 | 307 | 171 | 136 | 33 | 1 |
--------------------------------------------------------------------------------
module Hakyll.Core.Runtime
( run
) where
--------------------------------------------------------------------------------
import Control.Applicative ((<$>))
import Control.Monad (unle... | Minoru/hakyll | src/Hakyll/Core/Runtime.hs | bsd-3-clause | 11,108 | 0 | 24 | 4,036 | 2,238 | 1,177 | 1,061 | 192 | 9 |
{-# LANGUAGE DeriveDataTypeable, MagicHash, PolymorphicComponents, RoleAnnotations, UnboxedTuples #-}
-----------------------------------------------------------------------------
-- |
-- Module : Language.Haskell.Syntax
-- Copyright : (c) The University of Glasgow 2003
-- License : BSD-style (see the fi... | frantisekfarka/ghc-dsi | libraries/template-haskell/Language/Haskell/TH/Syntax.hs | bsd-3-clause | 49,614 | 36 | 14 | 13,677 | 8,709 | 4,791 | 3,918 | 622 | 9 |
{-# LANGUAGE PatternGuards #-}
module Idris.Interactive(caseSplitAt, addClauseFrom, addProofClauseFrom,
addMissing, makeWith, makeCase, doProofSearch,
makeLemma) where
{- Bits and pieces for editing source files interactively, called from
the REPL -}
import Idris.... | mrmonday/Idris-dev | src/Idris/Interactive.hs | bsd-3-clause | 19,791 | 3 | 25 | 8,264 | 6,817 | 3,348 | 3,469 | 381 | 30 |
{-# LANGUAGE FlexibleInstances #-}
{-# LANGUAGE GeneralizedNewtypeDeriving #-}
{-# LANGUAGE NoImplicitPrelude #-}
{-# LANGUAGE StandaloneDeriving #-}
{-# LANGUAGE Trustworthy #-}
{-# LANGUAGE TypeFamilies #-}
-----------------------------------------------------------------------------
-- |
-- Module : Data.Stri... | sdiehl/ghc | libraries/base/Data/String.hs | bsd-3-clause | 3,127 | 0 | 7 | 539 | 205 | 130 | 75 | 23 | 0 |
module ShouldSucceed where
w = a where a = y
y = 2
| ghc-android/ghc | testsuite/tests/typecheck/should_compile/tc018.hs | bsd-3-clause | 64 | 0 | 6 | 26 | 21 | 13 | 8 | 3 | 1 |
{-# OPTIONS_GHC -fno-warn-orphans #-}
{-# LANGUAGE DeriveLift #-}
module Language.HigherRank.TH (exprQ, typeQ) where
import Language.Haskell.TH.Quote
import Language.Haskell.TH.Syntax (Lift(..))
import Language.HigherRank.Parse
import Language.HigherRank.Types
deriving instance Lift EVar
deriving instance Lift Expr... | lexi-lambda/higher-rank | test-suite/Language/HigherRank/TH.hs | isc | 845 | 0 | 8 | 136 | 194 | 113 | 81 | -1 | -1 |
-- Sum of all the multiples of 3 or 5
-- https://www.codewars.com/kata/57f36495c0bb25ecf50000e7
module SumOfMultiples where
findSum n = f 5 n + f 3 n - f 15 n
where f d n = let a = (n `div` d) in (a * d * succ a) `div` 2
| gafiatulin/codewars | src/7 kyu/SumOfMultiples.hs | mit | 227 | 0 | 12 | 55 | 89 | 47 | 42 | 3 | 1 |
{-# LANGUAGE NoStarIsType #-}
{-# LANGUAGE TypeFamilies, KindSignatures, DataKinds, TypeOperators #-}
{-# LANGUAGE ScopedTypeVariables #-}
{-# LANGUAGE BangPatterns #-}
{-# LANGUAGE ForeignFunctionInterface #-}
module AI.Funn.Flat.LSTM (lstmDiff) where
import GHC.TypeLits
import Control.Applicativ... | nshepperd/funn | AI/Funn/Flat/LSTM.hs | mit | 4,367 | 0 | 38 | 1,567 | 1,331 | 680 | 651 | 73 | 1 |
module Y2016.M08.D04.Exercise where
{--
So, today we ask, "How do we solve a problem like Maria?"
No, wait. That's the wrong movie.
Okay, so, before we solved rows of sums that were either unconstrained or were
completely constrained, that is: we solved the summer-problem (unconstrained
values to sum to a total), or... | geophf/1HaskellADay | exercises/HAD/Y2016/M08/D04/Exercise.hs | mit | 1,735 | 0 | 9 | 370 | 228 | 142 | 86 | 13 | 1 |
-- |
-- Module : Toy.Cryptogram.Dictionary
-- Description : Cryptogram Dictionary
-- License : MIT License
-- Maintainer : Isaac Azuelos
{-# LANGUAGE OverloadedStrings #-}
module Toy.Cryptogram.Dictionary
( Dictionary (Dictionary)
, defaultPath
, empty
, fromWords
, toWords
, lookup
... | isaacazuelos/cryptogram | src/Toy/Cryptogram/Dictionary.hs | mit | 2,442 | 0 | 12 | 564 | 528 | 294 | 234 | 43 | 2 |
{-# LANGUAGE DataKinds #-}
{-# LANGUAGE OverloadedStrings #-}
module Console.GitHubStats
( fetchRepos
) where
import Control.Monad
import Data.Maybe
import Data.Text (Text)
import Network.HTTP.Req
import Numeric.Natural
import Co... | acamino/ghs | src/Console/GitHubStats.hs | mit | 1,614 | 0 | 13 | 418 | 407 | 203 | 204 | 44 | 1 |
{-# LANGUAGE PatternSynonyms, ForeignFunctionInterface, JavaScriptFFI #-}
module GHCJS.DOM.JSFFI.Generated.FontLoader
(js_checkFont, checkFont, js_loadFont, loadFont,
js_notifyWhenFontsReady, notifyWhenFontsReady, loading,
loadingDone, loadStart, load, error, js_getLoading, getLoading,
Fo... | plow-technologies/ghcjs-dom | src/GHCJS/DOM/JSFFI/Generated/FontLoader.hs | mit | 4,077 | 32 | 11 | 587 | 844 | 481 | 363 | 62 | 1 |
{-# LANGUAGE Trustworthy #-}
{- |
Module : Surge
Copyright : (c) 2014 Kyle Van Berendonck
License : MIT
Maintainer : kyle@vanberendonck.com
Stability : experimental
Portability : portable
This is a convenience module. Importing this module will automatically import in all the modules
you might re... | kvanberendonck/surge | src/Surge.hs | mit | 867 | 0 | 5 | 226 | 86 | 58 | 28 | 13 | 0 |
{- |
Module : ./Static/WACocone.hs
Description : heterogeneous signatures colimits approximations
Copyright : (c) Mihai Codescu, and Uni Bremen 2002-2006
License : GPLv2 or higher, see LICENSE.txt
Maintainer : mcodescu@informatik.uni-bremen.de
Stability : provisional
Portability : non-portable
Het... | spechub/Hets | Static/WACocone.hs | gpl-2.0 | 19,615 | 2 | 32 | 5,554 | 6,563 | 3,367 | 3,196 | 384 | 8 |
{-# LANGUAGE GADTs #-}
-- | Syntax of GADT's explained with examples.
module GADTSyntax where
-- | How do we write the following data types using GADT's?
--
-- Maybe:
--
-- > data Maybe a = Nothing | Just a
--
-- List:
--
-- > data List a = Nil | Cons a (List a)
--
-- Rose tree:
--
-- > data RoseTree a = RoseTree a [... | capitanbatata/apath-slfp | competent/gadts/src/GADTSyntax.hs | gpl-3.0 | 1,145 | 0 | 9 | 250 | 135 | 89 | 46 | 12 | 0 |
{-|
Module : Network.Ricochet.Testing.Crypto
Description : The tests for Network.Ricochet.Crypto
"Network.Ricochet.Testing.Crypto" contains all of the tests for
"Network.Ricochet.Crypto".
-}
module Network.Ricochet.Testing.Crypto where
import Network.Ricochet
import Network.Ricochet.Monad
import Network.Ric... | Jugendhackt/haskell-ricochet | test/Network/Ricochet/Testing/Crypto.hs | gpl-3.0 | 1,960 | 0 | 12 | 424 | 466 | 241 | 225 | -1 | -1 |
{-# LANGUAGE DeriveGeneric, OverloadedStrings, OverloadedLists #-}
module Modernator.RequestBodies where
import Modernator.Types()
import Data.Text
import Data.Time.Clock
import Data.Aeson
import GHC.Generics (Generic)
import Data.Swagger.Schema
import Control.Lens
import Data.Swagger.Internal
import Data.Swagger.Lens... | mojotech/modernator-haskell | src/Modernator/RequestBodies.hs | gpl-3.0 | 1,721 | 0 | 16 | 340 | 423 | 227 | 196 | 50 | 0 |
{-# OPTIONS_GHC -fno-warn-orphans #-}
module Main where
import Control.Applicative
import Language.Landler
import Test.QuickCheck
instance Arbitrary Term where
arbitrary = choose (1, 9) >>= go
where
go :: Int -> Gen Term
go 0 = Var <$> name
go n = oneof [Var <$> name, ab n, app n]
ab :... | scvalex/landler | Test/QC.hs | gpl-3.0 | 1,252 | 0 | 15 | 368 | 495 | 255 | 240 | 34 | 2 |
{-# LANGUAGE DeriveDataTypeable #-}
{-# LANGUAGE DeriveGeneric #-}
{-# LANGUAGE LambdaCase #-}
{-# LANGUAGE NoImplicitPrelude #-}
{-# LANGUAGE OverloadedStrings #-}
{-# OPTIONS_GHC -fno-warn-unused-imports #-}
-- |
-- Module : Network.Google.ContainerBuilder.Types.Sum
-- Copyright : (c) 2015-201... | brendanhay/gogol | gogol-containerbuilder/gen/Network/Google/ContainerBuilder/Types/Sum.hs | mpl-2.0 | 25,788 | 0 | 11 | 6,081 | 3,788 | 2,027 | 1,761 | 455 | 0 |
{-# LANGUAGE DataKinds #-}
{-# LANGUAGE DeriveDataTypeable #-}
{-# LANGUAGE DeriveGeneric #-}
{-# LANGUAGE FlexibleInstances #-}
{-# LANGUAGE NoImplicitPrelude #-}
{-# LANGUAGE OverloadedStrings #-}
{-# LANGUAGE RecordWildCards #-}
{-# LANGUAGE TypeFamilies #-}
{-# LANGUAGE TypeOperators ... | brendanhay/gogol | gogol-adexchangebuyer2/gen/Network/Google/Resource/AdExchangeBuyer2/Bidders/FilterSets/FilteredBidRequests/List.hs | mpl-2.0 | 7,543 | 0 | 18 | 1,576 | 891 | 520 | 371 | 135 | 1 |
{-# LANGUAGE OverloadedStrings, TemplateHaskell, TypeFamilies, RecordWildCards #-}
module Model.Volume.Types
( VolumeRow(..)
, Volume(..)
, VolumeOwner
, blankVolume
, toPolicyDefaulting
, volumeAccessPolicyWithDefault
, coreVolumeId
) where
import qualified Data.ByteString as BS
import Data.Maybe (fro... | databrary/databrary | src/Model/Volume/Types.hs | agpl-3.0 | 2,739 | 0 | 10 | 534 | 550 | 320 | 230 | -1 | -1 |
{-# LANGUAGE OverloadedStrings #-}
import Database.PostgreSQL.Migrations
import Database.PostgreSQL.Simple
up :: Connection -> IO ()
up = migrate $
create_table "hostname"
[ column "id" "serial PRIMARY KEY"
, column "hostname" "text NOT NULL UNIQUE"
, column "blog_id" "integer references blog(id)"]
down :: Co... | alevy/mappend | db/migrations/20151206190013_custom_hostnames.hs | agpl-3.0 | 425 | 0 | 8 | 75 | 115 | 59 | 56 | 14 | 1 |
{-# LANGUAGE ScopedTypeVariables #-}
{-# LANGUAGE OverloadedStrings #-}
import Graphics.UI.Gtk
import Control.Monad.IO.Class (liftIO)
import Data.Text (Text)
-- A function like this can be used to tag string literals for i18n.
-- It also avoids a lot of type annotations.
__ :: Text -> Text
__ = id -- Replace with getT... | juhp/gtk2hs | gtk/demo/actionMenu/ActionMenu.hs | lgpl-3.0 | 4,307 | 0 | 12 | 928 | 843 | 400 | 443 | 67 | 1 |
-- Simple Fibonacii
fib :: Int -> Int
fib x
| x < 3 = 1
| otherwise = fib (x - 1) + fib (x - 2)
| gnclmorais/interview-prep | recursion/04april/01fib.hs | unlicense | 108 | 0 | 9 | 40 | 62 | 30 | 32 | 4 | 1 |
module Main where
import Test.QuickCheck
import Data.Semigroup
------------------------------------------------------
-- Trivial
data Trivial = Trivial deriving (Eq, Show)
instance Semigroup Trivial where
_ <> _ = Trivial
instance Arbitrary Trivial where
arbitrary = return Trivial
semigroupAssoc :: (Eq m, Semi... | thewoolleyman/haskellbook | 15/14/haskell-club/chapter-exercises/src/Main.hs | unlicense | 1,269 | 0 | 10 | 236 | 439 | 233 | 206 | 27 | 1 |
{-# LANGUAGE OverloadedStrings #-}
-- Copyright 2014 (c) Diego Souza <dsouza@c0d3.xxx>
--
-- 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.... | locaweb/leela | src/warpdrive/src/Leela/Data/Types.hs | apache-2.0 | 8,933 | 0 | 15 | 2,754 | 2,884 | 1,501 | 1,383 | 258 | 4 |
{-# LANGUAGE DataKinds #-}
{-# LANGUAGE ScopedTypeVariables #-}
module Camfort.Specification.Stencils.Consistency ( consistent
, ConsistencyResult(..) ) where
import qualified Camfort.Helpers.Vec as V
import Camfort.Specification.Stencils.DenotationalSemantics
import ... | mrd/camfort | src/Camfort/Specification/Stencils/Consistency.hs | apache-2.0 | 2,846 | 0 | 14 | 672 | 650 | 346 | 304 | 63 | 10 |
-- Copyright 2018-2021 Google LLC
--
-- 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 required by applicable law or agreed t... | google/hs-collate | test/CollateTest.hs | apache-2.0 | 1,582 | 0 | 14 | 344 | 364 | 205 | 159 | 24 | 1 |
-- | Includes functions providing command line I/O
module Lycopene.Option
( module Lycopene.Option.Command
, module Lycopene.Option.Common
, module Lycopene.Option.Parser
) where
import Lycopene.Option.Common
import Lycopene.Option.Command
import ... | utky/lycopene | src/Lycopene/Option.hs | apache-2.0 | 350 | 0 | 5 | 107 | 48 | 33 | 15 | 7 | 0 |
{-# LANGUAGE FlexibleContexts, RankNTypes, RecordWildCards #-}
module Cloud.AWS.CloudWatch.Internal
where
import Cloud.AWS.Lib.Parser.Unordered (XmlElement, (.<))
import Control.Applicative
import Control.Monad.Trans.Resource (MonadThrow, MonadResource, MonadBaseControl)
import Data.ByteString (ByteString)
impor... | worksap-ate/aws-sdk | Cloud/AWS/CloudWatch/Internal.hs | bsd-3-clause | 1,008 | 0 | 11 | 162 | 258 | 151 | 107 | 26 | 1 |
module Numeric.Carbonara.Format where
import Data.Text.Lazy.Builder.RealFloat ( formatRealFloat, FPFormat(..)) --text pkg
import Data.Text.Lazy.Builder (toLazyText)
import Data.Text.Lazy (unpack)
-- | round in decimal places
-- > pi -> 3.141592653589793
-- > roundTo 20 pi -> 3.141592653589793
-- > roundTo... | szehk/Haskell-Carbonara-Library | src/Numeric/Carbonara/Format.hs | bsd-3-clause | 1,003 | 0 | 10 | 263 | 184 | 111 | 73 | 9 | 1 |
{-# LANGUAGE DeriveGeneric #-}
{-# LANGUAGE NoImplicitPrelude #-}
{-# LANGUAGE OverloadedStrings #-}
module Main where
import ClassyPrelude
import Data.Aeson.Text
import Data.Aeson.Types hiding (parse, Result)
import qualified Data.Char as Char
import Control.Concurrent.Async (w... | kitdallege/charlotte | app/Main.hs | bsd-3-clause | 7,270 | 0 | 20 | 1,786 | 2,030 | 1,060 | 970 | 151 | 3 |
module Test.Helper where
class C a where
method :: a -> Bool
instance C Int where
method _ = True
| bmillwood/notcpp | Test/Helper.hs | bsd-3-clause | 104 | 0 | 7 | 26 | 40 | 21 | 19 | 5 | 0 |
{-|
Module : RTable
Description : Implements the relational Table concept. Defines all necessary data types like RTable and RTuple and basic relational algebra operations on RTables.
Copyright : (c) Nikos Karagiannidis, 2017
License : GPL-3
Maintainer : nkarag@gmail.com
Stability ... | nkarag/haskell-CSVDB | src/Data/RTable.hs | bsd-3-clause | 129,913 | 0 | 27 | 48,996 | 15,304 | 8,522 | 6,782 | 1,217 | 11 |
{-
(c) The University of Glasgow 2006
(c) The GRASP/AQUA Project, Glasgow University, 1992-1998
-}
{-# LANGUAGE CPP, DeriveDataTypeable, DeriveFunctor #-}
-- | CoreSyn holds all the main data types for use by for the Glasgow Haskell Compiler midsection
module CoreSyn (
-- * Main data types
Expr(..), A... | snoyberg/ghc | compiler/coreSyn/CoreSyn.hs | bsd-3-clause | 73,820 | 0 | 14 | 20,075 | 8,567 | 4,874 | 3,693 | 608 | 5 |
-- | Simple forward automatic differentiation. The main reason for supplying this
-- module rather than using one of several similar alternatives available on Hackage
-- is that they all seem to use the following implementation of differentiation of
-- products (in our notation):
--
-- x * y = mkDif (val x * val y) (... | sydow/ireal | Data/Number/IReal/FAD.hs | bsd-3-clause | 6,211 | 0 | 13 | 1,651 | 2,238 | 1,163 | 1,075 | 99 | 4 |
{-# OPTIONS_GHC -fno-warn-missing-signatures #-}
{-# LANGUAGE TemplateHaskell #-}
module Grover.Tests where
import Ernie
import Multiarg.Examples.Grover
import Control.Applicative
import Test.QuickCheck hiding (Result)
import Multiarg.Mode
import Test.Tasty
import Test.Tasty.TH
import Test.Tasty.QuickCheck
tests :: T... | massysett/multiarg | tests/Grover/Tests.hs | bsd-3-clause | 3,952 | 0 | 16 | 917 | 1,201 | 629 | 572 | 89 | 5 |
module Exercises106 where
import Data.Time
import Data.List
data DatabaseItem = DbString String
| DbNumber Integer
| DbDate UTCTime
deriving (Eq, Ord, Show)
theDatabase :: [DatabaseItem]
theDatabase =
[ DbDate (UTCTime
(fromGregorian 1911 5 1)
... | pdmurray/haskell-book-ex | src/ch10/Exercises10.6.hs | bsd-3-clause | 1,139 | 0 | 10 | 320 | 386 | 209 | 177 | 35 | 2 |
{-# LANGUAGE OverloadedStrings, TypeFamilies #-}
module QueryArrow.RPC.Service.Service.Common where
import QueryArrow.DB.DB
import Data.Time
import QueryArrow.Serialization
import System.Log.Logger
import QueryArrow.Control.Monad.Logger.HSLogger ()
import QueryArrow.RPC.Message
import Control.Monad.Trans.Except
impor... | xu-hao/QueryArrow | QueryArrow-rpc-socket/src/QueryArrow/RPC/Service/Service/Common.hs | bsd-3-clause | 3,532 | 5 | 22 | 1,714 | 740 | 367 | 373 | 65 | 7 |
{-# LANGUAGE OverloadedStrings #-}
-- |
-- Module : BlazeVsBinary
-- Copyright : (c) 2010 Jasper Van der Jeught & Simon Meier
-- License : BSD3-style (see LICENSE)
--
-- Maintainer : Simon Meier <iridcode@gmail.com>
-- Stability : experimental
-- Portability : tested on GHC only
--
-- A comparison betwee... | meiersi/blaze-builder | benchmarks/BlazeVsBinary.hs | bsd-3-clause | 2,639 | 0 | 18 | 583 | 485 | 284 | 201 | 48 | 1 |
module Keyboard
( requestFromKey
) where
import Model (Request (..))
requestFromKey :: Char -> Maybe Request
requestFromKey 'h' = Just MoveLeft
requestFromKey 'j' = Just MoveDown
requestFromKey 'k' = Just MoveUp
requestFromKey 'l' = Just MoveRight
requestFromKey _ = Nothing
| camelpunch/rhascal | src/Keyboard.hs | bsd-3-clause | 297 | 0 | 6 | 62 | 85 | 44 | 41 | 9 | 1 |
module Process.DownloadProcess where
import Control.Concurrent
import Data.List
import qualified Data.Set as Set
import Graphics.GD
import Network.Curl
import System.Directory
import System.FilePath
import System.IO.Unsafe
import ... | carliros/Simple-San-Simon-Functional-Web-Browser | src/Process/DownloadProcess.hs | bsd-3-clause | 8,639 | 2 | 16 | 3,543 | 1,951 | 983 | 968 | 148 | 4 |
-- | An umbrella module for views concerning users and authorisation.
module Guide.Views.Auth
(
module Guide.Views.Auth.Login,
module Guide.Views.Auth.Register,
)
where
import Guide.Views.Auth.Login
import Guide.Views.Auth.Register
| aelve/guide | back/src/Guide/Views/Auth.hs | bsd-3-clause | 237 | 0 | 5 | 29 | 41 | 30 | 11 | 6 | 0 |
module OuterInner where
import Control.Monad.Trans.Except
import Control.Monad.Trans.Maybe
import Control.Monad.Trans.Reader
embedded :: MaybeT (ExceptT String (ReaderT () IO)) Int
embedded = return 1
maybeUnwrap :: ExceptT String (ReaderT () IO) (Maybe Int)
maybeUnwrap = runMaybeT embedded
eitherUnwrap :: ReaderT ... | peterbecich/haskell-programming-first-principles | src/OuterInner.hs | bsd-3-clause | 807 | 0 | 10 | 113 | 287 | 149 | 138 | 19 | 1 |
{-# LANGUAGE ScopedTypeVariables, RecordWildCards, OverloadedStrings, CPP, PatternGuards #-}
module General.Web(
Input(..), Output(..), readInput, server, downloadFile
) where
-- #define PROFILE
-- For some reason, profiling stops working if I import warp
-- Tracked as https://github.com/yesodweb/wai/issues/... | ndmitchell/hogle-dead | src/General/Web.hs | bsd-3-clause | 3,779 | 0 | 14 | 912 | 562 | 321 | 241 | 84 | 4 |
import Allegro
import Allegro.Display
import Allegro.EventQueue
import Allegro.Font
import Allegro.Keyboard
import Allegro.Graphics
red :: Color
red = Color 1 0 0 0
main :: IO ()
main =
allegro $
do f <- loadFont "../resources/font.ttf" 12 defaultFontFlags
putStr $ unlines [ "lineHeight = " ++ show (fontLine... | yav/allegro | examples/hs/font.hs | bsd-3-clause | 1,143 | 2 | 24 | 478 | 360 | 163 | 197 | 30 | 2 |
module Juno.Monitoring.EkgJson
(
encodeAll
, encodeOne
) where
import qualified Data.Aeson.Encode as A
import qualified Data.ByteString.Lazy as L
import System.Metrics
import qualified System.Metrics.Json as Json
-- | Encode metrics as nested JSON objects. See 'Json.sampleToJson'
-- for a descripti... | buckie/juno | src/Juno/Monitoring/EkgJson.hs | bsd-3-clause | 588 | 0 | 6 | 100 | 99 | 64 | 35 | 12 | 1 |
module Main where
main
= do { putStrLn "Hello World"
; putStrLn "Yes?"
; input <- getLine
; case input of
"a" -> putStrLn "A"
"b" -> putStrLn "B"
_ -> putStrLn "Other"
; putStrLn "Done"
}
| dterei/Scraps | haskell/myIndent.hs | bsd-3-clause | 207 | 6 | 10 | 56 | 80 | 39 | 41 | 10 | 3 |
#!/usr/bin/env stack
{- stack runghc --verbosity info
--package pandoc
-}
-- Replace a table of contents marker
-- (a bullet list item containing "toc[-N[-M]]")
-- with a table of contents based on headings.
-- toc means full contents, toc-N means contents to depth N
-- and toc-N-M means contents from depth N to dep... | mstksg/hledger | tools/pandoc-add-toc.hs | gpl-3.0 | 4,010 | 5 | 19 | 850 | 1,365 | 697 | 668 | 79 | 4 |
{-# LANGUAGE LambdaCase #-}
{-# LANGUAGE DataKinds #-}
{-# LANGUAGE ScopedTypeVariables #-}
-- -*-haskell-*-
-- GIMP Toolkit (GTK) Interface CellLayout
--
-- Author : Axel Simon
--
-- Created: 23 January 2006
--
-- Copyright (C) 2016-2016 Axel Simon, Hamish Mackenzie
--
-- This library is free software; you can re... | gtk2hs/gi-gtk-hs | src/Data/GI/Gtk/ModelView/CellLayout.hs | lgpl-2.1 | 9,580 | 0 | 31 | 2,275 | 1,189 | 673 | 516 | 105 | 6 |
{- |
Module : Data.DRS.Binding
Copyright : (c) Harm Brouwer and Noortje Venhuizen
License : Apache-2.0
Maintainer : me@hbrouwer.eu, n.j.venhuizen@rug.nl
Stability : provisional
Portability : portable
DRS binding
-}
module Data.DRS.Binding
(
drsBoundRef
, drsFreeRefs
) where
import Data.DRS.Dat... | hbrouwer/pdrt-sandbox | src/Data/DRS/Binding.hs | apache-2.0 | 3,206 | 0 | 14 | 813 | 1,017 | 522 | 495 | 43 | 8 |
-- | Provides a way of adding text to notes.
module Music.Score.Text (
-- * Text
HasText(..),
TextT(..),
text,
textLast,
) where
import Control.Applicative
import Control.Comonad
import Control.Lens hiding (transform)
import ... | music-suite/music-score | src/Music/Score/Text.hs | bsd-3-clause | 2,416 | 0 | 11 | 634 | 866 | 458 | 408 | -1 | -1 |
-- | Debugging infrastructure for the parallel arrays library.
module Data.Array.Parallel.Base.Debug
( check
, checkCritical
, checkLen
, checkSlice
, checkEq
, checkNotEmpty
, uninitialised)
where
import Data.Array.Parallel.Base.Config (debug, debugCritical)
... | mainland/dph | dph-base/Data/Array/Parallel/Base/Debug.hs | bsd-3-clause | 4,017 | 0 | 16 | 1,229 | 790 | 424 | 366 | 74 | 2 |
{-# LANGUAGE OverloadedStrings #-}
module Hi.Types
( Option(..)
, File(..)
, Files
, TemplateSource (..)
) where
import Data.ByteString (ByteString)
data File = TemplateFile { getFilePath :: FilePath, getFileContents :: ByteString } |
RegularFile { getFilePath :: FilePath, getFileCon... | jonathankochems/hi | src/Hi/Types.hs | bsd-3-clause | 802 | 0 | 9 | 250 | 204 | 127 | 77 | 21 | 0 |
{-
(c) The University of Glasgow 2006
(c) The AQUA Project, Glasgow University, 1994-1998
Core-syntax unfoldings
Unfoldings (which can travel across module boundaries) are in Core
syntax (namely @CoreExpr@s).
The type @Unfolding@ sits ``above'' simply-Core-expressions
unfoldings, capturing ``higher-level'' things w... | urbanslug/ghc | compiler/coreSyn/CoreUnfold.hs | bsd-3-clause | 58,043 | 0 | 19 | 16,858 | 6,625 | 3,510 | 3,115 | 499 | 32 |
{-# LANGUAGE CPP, GADTs #-}
-----------------------------------------------------------------------------
--
-- Pretty-printing of Cmm as C, suitable for feeding gcc
--
-- (c) The University of Glasgow 2004-2006
--
-- Print Cmm as real C, for -fvia-C
--
-- See wiki:Commentary/Compiler/Backends/PprC
--
-- This is simpl... | ml9951/ghc | compiler/cmm/PprC.hs | bsd-3-clause | 48,276 | 0 | 20 | 14,615 | 12,623 | 6,256 | 6,367 | 824 | 63 |
module Interpreter where
{-@ LIQUID "--totality" @-}
{-@ LIQUID "--real" @-}
data BinOp a = Plus | Times
data Exp a = EConst Int | EBinOp (BinOp a) (Exp a) (Exp a)
data Instr a = IConst Int | IBinOp (BinOp a)
data List a = Nil | Cons a (List a)
{-@ autosize Prog @-}
data Prog a = Emp | PInst (Instr a) (Prog a)
... | mightymoose/liquidhaskell | tests/todo/Interpreter.hs | bsd-3-clause | 3,744 | 10 | 17 | 981 | 861 | 448 | 413 | 49 | 2 |
module Reddit.Types.ListingSpec where
import Reddit.Types.Comment
import Reddit.Types.Listing
import Control.Monad
import Data.Aeson (eitherDecode)
import Network.API.Builder
import Test.Hspec
import Test.Hspec.QuickCheck
import qualified Data.ByteString.Lazy.Char8 as ByteString
isRight :: Either a b -> Bool
isRight... | FranklinChen/reddit | test/Reddit/Types/ListingSpec.hs | bsd-2-clause | 2,261 | 0 | 24 | 522 | 715 | 365 | 350 | -1 | -1 |
{-# LANGUAGE CPP, ScopedTypeVariables, MagicHash, UnboxedTuples #-}
-----------------------------------------------------------------------------
--
-- GHC Interactive support for inspecting arbitrary closures at runtime
--
-- Pepe Iborra (supported by Google SoC) 2006
--
----------------------------------------------... | forked-upstream-packages-for-ghcjs/ghc | compiler/ghci/RtClosureInspect.hs | bsd-3-clause | 52,483 | 12 | 27 | 16,045 | 12,172 | 6,180 | 5,992 | -1 | -1 |
module Module where
data Foo = Foo | Foo
| hvr/jhc | regress/tests/1_typecheck/4_fail/1_fixed_bugs/multiple_constructors.hs | mit | 42 | 0 | 5 | 10 | 14 | 9 | 5 | 2 | 0 |
{-# LANGUAGE CPP #-}
{-# LANGUAGE DeriveFunctor #-}
{-# LANGUAGE DeriveGeneric #-}
-----------------------------------------------------------------------------
-- |
-- Module : Distribution.Client.PackageIndex
-- Copyright : (c) David Himmelstrup 2005,
-- Bjorn Bringert 2007,
-- ... | tolysz/prepare-ghcjs | spec-lts8/cabal/cabal-install/Distribution/Client/PackageIndex.hs | bsd-3-clause | 10,243 | 0 | 13 | 2,289 | 2,255 | 1,229 | 1,026 | 152 | 4 |
{-# LANGUAGE Unsafe #-}
{-# LANGUAGE NoImplicitPrelude, MagicHash, UnboxedTuples #-}
{-# OPTIONS_GHC -funbox-strict-fields #-}
{-# OPTIONS_HADDOCK not-home #-}
-----------------------------------------------------------------------------
-- |
-- Module : GHC.MVar
-- Copyright : (c) The University of Glasgow 2... | sdiehl/ghc | libraries/base/GHC/MVar.hs | bsd-3-clause | 6,746 | 0 | 13 | 1,549 | 913 | 521 | 392 | 59 | 2 |
module T13568 where
import T13568a
data S = A
foo :: A -> ()
foo = undefined
| ezyang/ghc | testsuite/tests/rename/should_fail/T13568.hs | bsd-3-clause | 80 | 0 | 6 | 20 | 30 | 18 | 12 | 5 | 1 |
{-# LANGUAGE MagicHash, UnboxedTuples #-}
{-# OPTIONS_GHC -funfolding-use-threshold=10 #-}
module T13155 where
import GHC.Ptr
import GHC.Prim
import GHC.Exts
foo :: Ptr Float -> State# RealWorld -> (# State# RealWorld, Float #)
foo p s = case q :: Ptr Float of { Ptr a1 ->
case readFloatOffAddr# a1 0# s of ... | ezyang/ghc | testsuite/tests/simplCore/should_compile/T13155.hs | bsd-3-clause | 553 | 0 | 20 | 153 | 186 | 101 | 85 | 14 | 1 |
module Parallel where
import Control.Monad (foldM, when)
import Data.Foldable (traverse_)
import Control.Exception
import Control.Concurrent
import Control.Concurrent.Chan
import qualified Data.IntMap as IntMap
import Data.IntMap (IntMap)
data TaskStatus a
= Running ThreadId
| Failed SomeException
| Completed a... | glguy/5puzzle | src/Parallel.hs | isc | 2,317 | 0 | 17 | 619 | 684 | 343 | 341 | 52 | 5 |
{-# LANGUAGE DataKinds #-}
{-# LANGUAGE TypeApplications #-}
{-# LANGUAGE InstanceSigs #-}
{-# LANGUAGE ScopedTypeVariables #-}
{-# LANGUAGE TemplateHaskell #-}
{-# LANGUAGE TypeFamilies #-}
{-# LANGUAGE MultiParamTypeClasses #-}
{-# LANGUAGE UndecidableInstances #-}
{-# LANGUAGE GeneralizedNewtypeDeriving #-}
{-# LANG... | edwardwas/dimensional-cellular-automata | src/Data/Coord.hs | isc | 6,238 | 0 | 23 | 1,342 | 3,111 | 1,572 | 1,539 | 141 | 3 |
import Data.List (sortBy)
main = putStrLn $ show solve
solve :: Int
solve = head $ sortBy (\x y -> compare y x) $ palindromeProducts 100 999
palindromeProducts :: Int -> Int -> [Int]
palindromeProducts l h = map read $ filter isPalindrome $ map show [x*y | x <- [l..h], y <- [x..h]]
isPalindrome :: (Eq a) => [a] -> ... | pshendry/project-euler-solutions | 0004/solution.hs | mit | 357 | 5 | 10 | 73 | 195 | 94 | 101 | 8 | 1 |
module ProjectEuler.Problem139
( problem
) where
import Control.Monad
import ProjectEuler.Types
problem :: Problem
problem = pureProblem 139 Solved result
{-
Get some initial search going.
for m > n > 0, we can generate pythagorean triples through:
a = m^2 - n^2
b = 2*m*n
c = m^2 + n^2
For the tu... | Javran/Project-Euler | src/ProjectEuler/Problem139.hs | mit | 1,432 | 0 | 14 | 408 | 234 | 127 | 107 | 19 | 2 |
{-# LANGUAGE OverloadedStrings #-}
module Greek.Parsers.MorphologyParser (
nounParser
, verbParser
, adjParser
, partParser
, pronounParser
, infParser
, advParser
, entryParser
, parseHeader
, morphParser
) where
import qualified Data.Text as T
import Data.Attoparsec.Text
import Control.App... | boundedvariation/ntbible | Greek/Parsers/MorphologyParser.hs | mit | 6,155 | 0 | 25 | 1,698 | 1,761 | 924 | 837 | 200 | 1 |
{-# LANGUAGE OverloadedStrings #-}
{-# LANGUAGE ScopedTypeVariables #-}
{-# LANGUAGE TemplateHaskell, CPP #-}
{-# LANGUAGE RecordWildCards #-}
{-# LANGUAGE PatternGuards #-}
-- | Static file serving for WAI.
module Network.Wai.Application.Static
( -- * WAI application
staticApp
-- ** Default Settings
... | ygale/wai | wai-app-static/Network/Wai/Application/Static.hs | mit | 10,506 | 0 | 18 | 3,038 | 2,482 | 1,294 | 1,188 | 194 | 9 |
module Expr where
import Combinators
import Test.HUnit
import Data.Char
-- 5.5 баллов
data Value = I Int | B Bool deriving (Eq, Show)
data BinOp = Plus | Mul | Minus | Less | Greater | Equals deriving (Eq, Show)
data UnOp = Neg | Not deriving (Eq, Show)
data Expr = BinOp BinOp Expr Expr | UnOp UnOp Expr | Const Valu... | SergeyKrivohatskiy/fp_haskell | hw08/Expr.hs | mit | 4,684 | 0 | 15 | 1,373 | 1,878 | 966 | 912 | 104 | 16 |
{-# htermination (compareTup0 :: Tup0 -> Tup0 -> Ordering) #-}
import qualified Prelude
data MyBool = MyTrue | MyFalse
data List a = Cons a (List a) | Nil
data Tup0 = Tup0 ;
data Ordering = LT | EQ | GT ;
compareTup0 :: Tup0 -> Tup0 -> Ordering
compareTup0 Tup0 Tup0 = EQ;
| ComputationWithBoundedResources/ara-inference | doc/tpdb_trs/Haskell/basic_haskell/compare_1.hs | mit | 290 | 5 | 8 | 72 | 94 | 46 | 48 | 7 | 1 |
{-#LANGUAGE OverloadedStrings#-}
module Yesod.Raml.Routes.Internal where
import Control.Applicative
import Control.Monad
import qualified Data.Yaml as Y
import qualified Data.Yaml.Include as YI
import qualified Data.ByteString.Char8 as B
import qualified Data.Text as T
import qualified Data.Char as C
import qualified... | junjihashimoto/yesod-raml | yesod-raml/Yesod/Raml/Routes/Internal.hs | mit | 6,025 | 0 | 19 | 1,462 | 2,125 | 1,083 | 1,042 | 145 | 5 |
module Language.UHC.JScript.SafeTypes where
import Language.UHC.JScript.ECMA.String (JSString)
foreign import js "typeof(%1)"
typeof :: a -> JSString
-- | Would like fun dep here
class FromJS a b => FromJSPlus a b where
jsType :: a -> b -> String
check :: a -> b -> Bool
check a b = jsType a b == fromJS (type... | kjgorman/melchior | Language/UHC/JScript/SafeTypes.hs | mit | 501 | 1 | 12 | 167 | 164 | 86 | 78 | -1 | -1 |
module Language.Astview.Languages.Haskell (haskellExts) where
import Prelude hiding (span)
import Language.Astview.Language hiding (parse)
import Language.Astview.DataTree (dataToAstIgnoreByExample)
import Data.Generics (Data,extQ)
import Data.Generics.Zipper(toZipper,down',query)
import Language.Haskell.Exts.Parser... | jokusi/Astview | src/core/Language/Astview/Languages/Haskell.hs | mit | 1,159 | 0 | 11 | 251 | 358 | 196 | 162 | 23 | 2 |
module Proxygen
(
) where
| Dryvnt/proxygen-hs | src/Proxygen.hs | mit | 35 | 0 | 3 | 14 | 7 | 5 | 2 | 2 | 0 |
{-
- todo bobjflong: move this to Types.hs
-}
{-# LANGUAGE OverloadedStrings #-}
{-# LANGUAGE RankNTypes #-}
{-# LANGUAGE TemplateHaskell #-}
module Web.Stellar.Internal where
import Control.Applicative
import Control.Monad
import Data.Aeson
import Data.Monoid
impor... | bobjflong/stellar-haskell | src/Web/Stellar/Internal.hs | mit | 957 | 0 | 8 | 199 | 220 | 121 | 99 | 26 | 1 |
module Euler.E16 where
import Data.Char
base :: Integer
base = 2
euler16 :: Int -> Int
euler16 n = sum $ map digitToInt $ show $ base^n
main :: IO ()
main = print $ euler16 1000
| D4r1/project-euler | Euler/E16.hs | mit | 181 | 0 | 9 | 40 | 79 | 42 | 37 | 8 | 1 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.